This is our old blog. It hasn't been active since 2011. Please see the link above for our current blog or click the logo above to see all of the great data and content on this site.

Site Updates, Performance Upgrades, and New Features

Posted by Sean Forman on October 26, 2010

Yesterday afternoon. we update the full site with some new functionality, new look and new performance upgrades.

We had been using the Prototype javascript framework, but I rewrote the code to use the jQuery framework and also rewrote much of the play index to bring it more into line with what we changed in the major site upgrade in spring 2009. I'll add another post about Play Index upgrades.

While implementing jQuery, I added a few new features:

The sorting now has three states, Descending/Ascending, Ascending/Descending, and back to default, so you can undo a sort and get the table back the way you had it before.

We now have better looking tooltips to explain the stats, have have a glossary option that now allows you to see all of the tooltips at once. If you are in a webkit browser, you'll notice a nice drop shadow and rounded corners.

All dialogs/popups are draggable, and resizeable and can be closed with the key.

When sorting a column, we now highlight the column with a yellow background and a thick border.

The dropdowns for things like splits, gamelogs, etc now have a delay when you turn them on and off so they you are less likely to inadvertently turn them on or lose focus on them.

On the appearance front, I've tried to study what is the best practices and implement them here. The big change is that we no longer underline text links on the pages. This removes a lot of underlines and the appearance is definitely cleaner, but we will see if it is more usable. Also, I tried to have a plan for other presentation items, so pages should render more consistently. Player medals are now pure css. We use an image sprite for common images like the twitter and facebook badges and others.

We are now using the html5 doctype, but not really any of the features yet.

On the performance front, I went through Steve Souder's excellent book with a fine-toothed comb and tried to implement all of the suggestions I could. Right now, we are still serving uncached JS and CSS files, mainly because I knew there would be a bunch of tweaks and doing it locally on my server is alot easier than having to do a new version every time on the cloudfront server. I will probably switch over to a CDN served, far-future expiring css and js file soon after the WS is over.

Early returns on twitter are that the site is much faster. I hope your experience bears that out.

Please report any issues you find.

Still to do:
Update blog appearance
Update bullpen appearance
fix issues with tooltips on gamelogs and box scores
Team gamelog row summing

15 Responses to “Site Updates, Performance Upgrades, and New Features”

  1. Play Index Updates » Baseball-Reference Blog » Blog Archive Says:

    [...] You Are Here > Baseball-Reference.com > Blog > Baseball Stats and Analysis Baseball Reference Blog Numbers, News, and Notes « Site Updates, Performance Upgrades, and New Features [...]

  2. Thomas Says:

    Box scores except this year aren't working when going through Boxes on the tool bar at the top, then searching via a year. If that makes sense.

    Additionally, the Orioles managers for this season are all mixed up... each of the three managers have their w-l's doubled, as well as each of the box scores for all season long have Showwalter as the manager.

    Additionally, I greatly enjoy the new looks..... Thanks! and keep up the great work!

  3. Mike Says:

    Clicking on Get Report in an individual player's streak finder returns the following error message:

    Webpage error details

    User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; InfoPath.1)
    Timestamp: Wed, 27 Oct 2010 18:03:34 UTC

    Message: Object doesn't support this property or method
    Line: 16
    Char: 45920
    Code: 0
    URI: http://www.baseball-reference.com/js/sr-br-min.js

  4. DavidRF Says:

    @3
    Yeah, I've noticed that some of the more advanced layouts don't look right in the Firefox 4.0 beta. That's still just a beta release, so I can understand why its not supported. I don't know if the bugs are in beta-Firefox or bb-ref. Might be something bb-ref could keep an eye on in the coming months.

  5. Sean Forman Says:

    David,

    Throw me a bone here. What pages? I'll fire up vmware and try it out.

  6. pcg Says:

    The CSS appears to be busted to one degree or another, depending on the browser. Loading this page (http://www.baseball-reference.com/blog/archives/8863) in each of the following browsers yields:

    Chrome 7.0.517.41: http://upload.agathongroup.com/aac3127f439577829f82450c5e940f74.png (this one is particularly distracting, as the grey ends up the background for the entire content div)
    Firefox 3.5.11: http://upload.agathongroup.com/07d02e217d7cb7de4807abc7fc96486c.png
    Safari 5.0 (6533.16): http://upload.agathongroup.com/d9ed4ac44dc795eb12c39e9af51a5b58.png

    I'm no designer/programmer, but the problem appears to be in sr.css where body#front defines background-color:#DDDDDD. If I use Firebug to ignore that clause, the site looks right on.

    Hope that helps!

  7. pcg Says:

    Quick followup: there must've been a caching issue for me in Chrome. The background is no longer entirely grey, but there's still the stair-step effect as seen in Firefox and Safari. See http://upload.agathongroup.com/64e984b3254ee36293184f6d479f420e.png for the latest Chrome screenshot.

  8. Sean S Says:

    Do you think you'll have playoffs added to the leaderboard page? Saw the playoff WPA in the Times article and that made me want to see more - what position players have the greatest playoff WPA?

  9. Sean Forman Says:

    Pcg,

    I just updated the blog css and theme, so you shouldn't see these issues anymore.

  10. Fly Says:

    The hall of fame and All Star badges don't work right. At all.

  11. Fly Says:

    And I left a tag open.

  12. Vlad Says:

    New site is very good. Quick load, clean look.

    My one complaint is that I'm prompted to install Flash on pretty much every page, and I'm not able to do that because this machine is a work box and user accounts can't install software.

  13. jmac66 Says:

    play index is badly screwed up

  14. Sean Forman Says:

    Jmac,

    Please elaborate. I really can't do anything with your bug report.

  15. Vlad Says:

    When I search for Rangers prospect "Miguel De Los Santos", no results come up. His page is still there, though: http://www.baseball-reference.com/minors/player.cgi?id=deloss001mig

    On a work PC, running IE.