If you’ve been going over the site this morning (and come on, who hasn’t?) you may have noticed it acting a wee bit odd. That would be because I performed some updates today, mainly:
![]()
- The site can now increase/decrease the font size via the button at the top right.
- The site is now 2/3 smaller.
- The site is now xhtml+xml compliant.
Font Sizing
Thanks to the cool folks over at A List Apart and their article “Power To The People: Relative Font Sizes” I have placed the buttons in the upper right to allow people to resize the font size on this site (as inspired by certain recent comments.)
It’s some pretty neat JavaScript code, fairly un-obtrusive, and does the job nicely. Pretty easy to implement as well (thank you site templates!)
2/3 Reducation
In addition to adding a handy user feature, I added a nice backend feature. Using this article from FiftyFourEleven.com, “Gzipping your CSS with PHP”, I have been able to compress my CSS file from 4k, to 1.1k. That’s pretty signifigant.
Taking the technique one step futher, I applied it to my site template. Now all the HTML files are also being sent as gziped content, this reduced the home page from 11k to about 4k.
Original sizes: 11k html 4k css (images)
Gzipped sizes: 4k html 1k css (images)
Total savings: 15k down to 5k. Snazzy!
xhtml+xml
The site is also nowing being served up as “application/xhtml+xml” if your client accepts it. Otherwise you get the standard “text/html” version. Helps because if there is one single error on my pages, it breaks completely. :D I know pretty quick then if I’ve made a boo-boo.
This technique came from the article at XML.com called, The Road to XHTML 2.0: MIME Types, written by Mark Pilgram. Good read as to not only how-to, but why-to.
(Actually, this update was done about a week ago – just getting around to talking about it now though.)