March 24, 2004

Choose your type size

I've had a few complaints that the type on this site is too small, and my 33-year-old eyes have trouble reading it on one of my smaller monitors. Fortunately, at least for users with newer browsers, there's an easy answer: a stylesheet switcher. (It works in Mozilla, Safari, and recent versions of Internet Explorer and Netscape browsers. It does not work in Netscape 4.x or earlier browsers.)

All of the pages on this site now reference three different stylesheets. The default stylesheet is still the same, but you can choose from small type, Medium Type, or Large Type at the bottom of the left-hand menu. (Clicking on them in this story works too - give it a try.)

When you choose one of these, the browser will save your choice to a cookie named "style". This cookie, accessible only to this web site and containing only the style information, will be read when you visit pages on this site, and used to set the size of the text to your preferred size.

(This site also uses cookies if you post a comment and select "Yes" under "Remember personal info?" Cookies are not used to track users in any way, however. And yes, I wrote a book about cookies a few years ago, so I feel confident talking about what they can and cannot do.)

The code for doing this derives from this excellent article with tweaks listed here under "Gecko debugged", if you're curious about how this operates.

It's not a major change, and I'll put a nicer interface on it at some point, but hopefully it will make visiting the site more pleasant.

Posted by simonstl at March 24, 2004 08:14 AM
Note on photos
Comments
Comment
-->