Anne van Kesteren just posted about the Opera 9 Preview. More notable to me is the testcase for Linking to style sheets with HTTP headers.
Here’s the code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html lang="en"> <head> <title>CSS: Linking to style sheets with HTTP headers</title> <meta name="Author" content="Krijn Hoetmer ~ http://ktk.xs4all.nl/"> </head> <body> <h1>Linking to style sheets with <abbr title="HyperText Transfer Protocol">HTTP</abbr> headers</h1> <p>This line should (or could) be red.</p> <hr> <h2>Code</h2> <pre><code>Link: <index.css>; REL="stylesheet"; MEDIA="screen"</code></pre> </body> </html>
The testcase already works (P element in red) in the current Firefox 1.07 (but not IE, natch). Style code is utterly missing from the document — there are no
style attributes, and no
That’s because they’re not in the document. It’s in the headers of the HTTP response which delivered the document. I had to find the style insertion with the Fiddler tool (a great IE addin), and this is what I found in the HTTP headers:
Link: <index.css>; REL="stylesheet"; MEDIA="screen"
I must’ve missed the memo where this became a standard (since multiple browsers now support it). I miss how it’s a good idea too…
Yes, there’s a gee whiz factor to it. I could even think of possible uses for HTTP style includes (like configuring includes at the website level via the web server, something which IIS already can do with normal include files).
But it just seems like a bad idea.
Granted, the line between protocol and document was crossed long ago with HTTP-EQUIV META tags. This, however, crosses it in the opposite direction, by putting not meta-data, not layout or behavior data, but style data into a transport protocol!
Now I’m no code purist — I feel most like a “SAVD” on Molly’s scale (What’s bizarre is that I’d consider Anne much closer to a purist, a “SASS” to Molly.)
We have CSS to get the font tags out of HTML. Why not cram it into something even more poorly suited like HTTP?!
VERY bad idea.