Wandering Thoughts archives

2010-04-17

The 30 second elevator pitch on HTML 4.01 (vs XHTML)

Every so often I run into someone who has drunk the XHTML koolaid. For a long time I didn't really know what to say to them about it; while I have strong opinions about this, my usual discussion of this is fairly long and somewhat tedious, and thus not quite the thing to drop into conversation to convince people. What I needed was not a long reasoned argument against XHTML (complete with a careful inventory of its practical problems) and in favour of, say, HTML 4.01, but a 30 second elevator pitch.

Recently I finally came up with one (although I haven't actually put it to the test yet):

HTML 4.01 Strict is just as well defined and parseable as XHTML, and it is much more likely to be interpreted predictably and as you intend by user agents.

Since this is an elevator pitch, it's not intended to be the entire argument; if the XHTML-using person was actually interested in the issues, I would expect to have to expand on basically all of this.

It's possible that this is not a convincing elevator pitch because it doesn't really address the reasons that most people use XHTML. My cynical side thinks that most XHTML use is basically cargo cult HTML, so maybe the right elevator pitch would be some sort of snappy statement about how XHTML is not actually standards compliant in practical usage, or how all the cool people are now using HTML 5.

(Although I believe that most browsers now interpret mis-served XHTML pages in 'standards mode' not 'random tag soup HTML' mode, I don't think that any browser actually interprets them as XHTML.)

As a side note, I suspect that part of my elevator pitch here is incorrect, in that most people likely intend their XHTML to be interpreted by user agents just as it is being now and would be horrified if it was interpreted as actual XHTML.

ElevatorXHTMLvsHTML4 written at 01:27:29; Add Comment

2010-04-04

The problem with header and footer overlays on web pages

There seems to be a new annoying trend in web page design of making persistent headers or footers (or both) that don't scroll out of view when you scroll the web page but instead stay permanently visible at the top or bottom of your browser window, overlaying the conventional content. Sadly, this design element is a big fat failure (at least for me).

(I'm sure someone has also implemented a sidebar overlay too; I just haven't seen a website with one yet.)

The problem with these overlays is that they screw up normal page-based scrolling. Because these headers and footers are implemented in CSS as overlays, the browser runs the main content text all the way from the top to the bottom of the browser window; it's just that you can't see some of it. Then when I hit spacebar to scroll a page the browser scrolls the whole page as if the overlays weren't there, which means that it scrolls too much for what is actually visible.

(Browser page scrolling is designed to have a bit of overlap, which helps you reorient and be sure that you haven't missed anything. With a short overlay you might wind up with no overlap at all but be able to see all of the text; with a taller overlay, you will wind up missing some text. For example, if the browser window is currently showing lines 1-25 of the main content and you use spacebar to scroll a full page, it should wind up showing lines 25-49 or so. With an overlay, what typically happens is that the browser thinks it's showing lines 1-30, with lines 26-30 hidden under the overlay, so it scrolls to show you lines 29-53; you have no overlap and you've missed lines 26-28 entirely.)

In theory a browser could be smart enough to work out the real size of the scrollable area that you can see. In practice, I don't think that any browser is.

Sadly, the popularity of these header or footer overlays suggests that people pretty much don't do full-page scrolling these days and instead scroll incrementally with their mouse's scroll wheel (some local anecdotal evidence supports this). I notice this sort of thing because I don't have a scroll wheel mouse.

OverlaysProblem written at 02:18:55; Add Comment


Page tools: See As Normal.
Search:
Login: Password:
Atom Syndication: Recent Pages, Recent Comments.

This dinky wiki is brought to you by the Insane Hackers Guild, Python sub-branch.