Responsive images using cookies

via Responsive images using cookies | Keith Clark.

A while ago now, Keith Clark tweeted about using cookies as a means of serving images to a browser based on the size of the device viewport. Scott Jehl has already implemented the idea into a branch of his responsive images script but now that I have a platform to document my ideas I’ve decided to write up my approach to responsive images.

CSS media queries allow us to develop flexible designs that adapt to the device rendering them. Initially designers worked in a “desktop-down” fashion designing for large screen sizes, working down to the smallest. This approach has since been challenged and now projects such as Mobile Boilerplate and ‘320 and Up ‘ are encouraging a “mobile-up” approach to design.

Continue reading


IE conditional comments and asset load order

IE conditional comments and asset load order | Keith Clark.

Yesterday I was experimenting with a few ideas for decreasing the start-up time of selectivizr (something I’ll be posting about in the future). Part of the testing process was to establish if the position of the selectivizr script in a document had any affect on its start-up time. While testing I noticed an interesting side effect relating to the way assets are downloaded when they are mixed with conditional comments. I couldn’t find any specific information on this behavior so I thought I’d document my findings here.

Continue reading