Scott Jehl on the responsive Boston Globe site

Scott Jehl on the responsive Boston Globe site

Opera’s Bruce Lawson talks to Scott Jehl of The Filament Group about developing the highly-regarded and responsive website for The Boston Globe

This article originally appeared in the November issue (221) of .net magazine - the world's best-selling mag for web designers and developers.

Bruce Lawson: Who worked on this with you?
SJ: Filament Group, Ethan Marcotte, Upstatement, Mat Marquis and Miranda Mulligan, digital design director at The Boston Globe, comprised the main ‘design-velopment’ team. Meanwhile the Globe’s in-house team was incredibly proficient at translating our frontend code into the fully-functional site that it is today.

BL: Ethan Marcotte is the poster child for responsive web design; how much of an influence did he have in the process?
SJ: Much of the development process was driven by Ethan’s thinking with regards to designing ‘responsively’. In order to employ that thinking on a large scale site, we had to extend the original techniques that largely applied to layout to other areas like behaviour, markup enhancements, conditional asset loading and performance.

BL: What were the initial technical challenges?
SJ: Mainly, we wanted the page to perform well on underpowered devices, which meant figuring out a way to load assets efficiently and responsively so that we would not add significant overhead where it wasn’t properly supported or needed. Every critical feature of the site was designed to work independent of JavaScript, but enhanced with richer JavaScript-driven interactions in capable browsers. We focused on delivering the least amount of JavaScript upfront that we’d need to perform important polyfills, detect features, and conditionally load more JavaScript depending on environmental conditions.

BL: Why did you choose to useHTML5?
SJ: We used HTML5 for a number of reasons. Mostly, it’s future-friendly and offered features that were useful in our feature set. For example, we made wide use of data- attributes for configuring behavioural options or associating content enhancements. We also appreciated the ability to use newer semantic elements in place of div/p/ span where they made sense.

BL: How did you make the site degrade gracefully on older browsers?
SJ: In order to make the responsive layouts work in browsers lacking media query support, such as IE6-IE8, we needed a fast CSS3 Media Query polyfill. We found that existing solutions were too heavy and didn’t translate the layouts quickly enough, so we needed to write our own. The result of that is the Respond.js polyfill, which is open sourced on Github.

BL: What was your approach to images?
SJ: We wanted to serve mobile-friendly images up front, to be responsible with bandwidth on slower connections, but we needed to serve much larger images on devices with bigger screens. We devised an approach called Responsive Images, which allowed us to detect the screen size, and on large screens, swap the mobile-sized image for a larger one without loading both.

Another challenge was advertising, as many third-party ad services are not built with fluid layouts in mind, and their embedding mechanisms and number of requests they make can be quite costly from a performance perspective. In the end, we devised some patterns for loading the ads dynamically so that they would not block the content from loading immediately. I think third- party services will need to be rethought to adapt to the future of how websites will be made.

BL: And what about old IE/no-JavaScript browsers such as Opera Mini?
SJ: We spent a great deal of time making sure the site was functional and enjoyable to use without JavaScript, as the mobile web makes that issue all- the-more relevant again.

Internet Explorer browsers needed to be polyfilled for media query support. Other than that, we had the occasional Internet Explorer-specific CSS workarounds, but nothing too much.

I find Opera Mini tends to be pretty easy to support if you build with progressive enhancement: it’s a great browser with lots of performance optimisations included, and of course it’s incredibly popular so supporting it is a no-brainer.

The baseline browser we were regularly testing was BlackBerry 4.6, which receives a basic, JavaScript-free experience like most other non- media-query-supporting browsers. Somebody sent us a screenshot of the Globe site running on a Newton recently!

  • Job: Web designer and developer
  • Company: Filament Group
  • Previous career: Co-author of Designing with Progressive Enhancement and a frequent speaker at event
  • Online: scottjehl.com and @scottjehl

4 comments

Comment: 1

As impressive as the site is for all its RWD techniques and cross-browser support, it still could use some help with print styles (http://www.printshame.com/2012/04/bostonglobecom.html). This isn't unique to Boston Globe, but given how many devs look to this site for examples (and its polyfills), it's a great opportunity to also teach devs interested in RWD that print is just another display method for which they should account in their work.

Comment: 2

Hey Aardrian. I'd have to check how things are set up now, but last I knew, the print experience for articles on the Globe site was pretty well handled. We spend a good deal of time refining it. Landing pages (like the one you've shown) may not be printed frequently, but when they are, I gather it's common to assume the user is trying to print the screen representation of that page, for posterity or what have you (or at least, I think that was part of the rationale on this particular site).

Comment: 3

Scott, because I couldn't get any further into the site (I was unwilling to register) I didn't have the opportunity to print an individual article. I suspect a user is more likely to print one story (to bring home to mom?) so I know my example isn't ideal for the site.

To your point, though, I don't think the page I printed is really a good screen representation of the page. I do understand why you would not worry about print styles so much on pages like that, though I would expect common elements throughout the site to be treated the same way in print (again, I cannot confirm without registering) .

I'll stop speculating now.

Comment: 4

I liked the part about advertising : it's quite hard to find a third party willing to adapt its fixed-width ads.
I don't see any on the homepage, maybe I have to suscribe ? I'm quite curious to see how you handle them.
June issue on sale now!

The Week in Web Design

Sign up to our 'Week in Web Design' newsletter!

Hosting Directory
.net digital edition
Treat yourself to our geeky merchandise!
site stat collection