Don’t call me DOM

20 September 2006

Making this blog mobile friendly

I then started to look at the size of the content sent to the clients; the aforementionned default delivery context requires that you don’t send more than 10 Ko of markup and more than 20 Ko of content in general per page (per the PAGE_SIZE_LIMIT Best Practice); my blog home page was already at 25 Ko of markup, plus a 34 Ko image, so I was well above the allowed sizes.

I looked at what I could removed or reduced to make it fit, and decided that having the full list of categories and a calendar table on the right-hand side menu wasn’t the most useful thing to have repeated on each page of the blog; so I moved them into my first WordPress Page, using the predefined archives template that was already providing mostly what I needed; I thus have now a separate page with my categories and monthly archives.

I continued by removing some extraneous white space, but I was still around 12Ko of markup; not far from the what I needed, but not quite yet; I should have mentioned that I’m using the very useful Post Teaser plugin, which already made possible to have well-cut excerpts from my posts rather than having full posts on the home page, or having to deal myself with deciding where to put the cut.

To go under the 10 Ko bar, I simply decided to only present 4 posts per page instead of the 5 I had chosen before; for some reason, I feel that using an odd number is nicer than an even one, but I guess I can live with it – I would find serving only 3 posts really limiting.

This was all and good for the blog home page, but this didn’t help for individual blog entries; once every often, I end up writing pretty long posts that would make my individual entries go over the 10Ko limit. I discovered at this occasion that WordPress offer a <–nextpage–> “quicktag” that allows to set markers inside a post to tell where it should be broken in pages; I’ve started to apply this tag to some of my longest posts, although having a way to see at a glance which posts need such a treatment would be quite useful. I guess this could be something worth developing into a plugin.

One Response to “Making this blog mobile friendly”

  1. Justin Thorp Says:

    Awesome technique on serving up XHTML Basic. I have never really written anything in XHTML Basic before and was really confused until now about how I was going to make it work.

Picture of Dominique Hazael-MassieuxDominique Hazaël-Massieux ( is part of the World Wide Web Consortium (W3C) Staff; his interests cover a number of Web technologies, as well as the usage of open source software in a distributed work environment.