Site Tweaks
- General
- 0 Comments
- 4 years ago on August 30, 2004
I have just finished reading Designing With Web Standards and Web Standards Solutions and I can highly recommend both books.
Designing With Web Standards is more of a theory and best practice book, while Web Standards Solutions covers specific markup and style scenarios and the multiple ways to approach them. Following the same approach as the SimpleQuiz section on the author’s web site, I found this book gave me plenty of ideas about how I could improve and optimize the markup and styles used on this site.
I have now been through the entire site and tweaked both the markup and the corresponding styles. While the changes are not necessarily visible unless you view the source, the markup has been substantially tidied and the styles drastically improved. Not only has this reduced page weight and improved the semantics of the markup, but it makes design changes so much easier to implement. As well as these tweaks I have made two other significant changes.
Specific Changes
Firstly, all JavaScript is now “unobtrusive” - a term used by Jeremy Keith. Having read his article This Year’s Document Object Model, I re-implemented all the JavaScript on this site so that it no longer uses attributes such as ‘onclick’, but is instead contained entirely in external scripts. This helps to keep the markup even cleaner and further separate content from presentation from behavior. I wrote my own version of the ‘addLoadFunction’ script and it is freely downloadable without conditions.
Secondly, this site is now served with a MIME type of application/xhtml+xml to those browsers that accept it. Having read Content Negotiation on 456 Berea Street, I wrote my own version of Keystone Websites’ negotiation script that is also freely downloadable without conditions. Making this change immediately helped me to find markup errors as Firefox shows an error for any non-well-formed page that is served with this MIME type.
While most of these changes are invisible to the average user, they improve the validity of the site and will help to maintain the site going forward.
Latest Comments