Time to fix those broken pages
29th May 2004
I have a whole bunch of gripes about Internet Explorer, but my personal favourite is the way it will render a document served with a text/plain
Content-Type header if it thinks the file might contain HTML. The direct result of this is that people with misconfigured web servers who are serving their HTML with the wrong Content-Type frequently don’t realise, so when users of better behaved browsers such as FireFox visit they get hit in the face with a page of raw source code.
The times they are a-changing. I just spotted this gem in MSDN’s article How to Make Your Web Site Work with Windows XP Service Pack 2:
Q: Does your Web site contain files with file types that do not match their Content-Type and/or file extension?
A: You should correct all of these mismatches. Both the Content-Type and the file extension must match the type of the file for a download prompt to appear. Be sure this is true for your Web pages as well. If the Content-Type is plain/text, then they will not render as HTML.
Of course, the rate at which people upgrade to service pack 2 is likely to be pretty poor but at least new machines will have it installed by default. Hopefully sites serving the wrong Content-Type for their HTML documents will be forced to clean up pretty quickly.
The other issue mentioned in that quotation—forcing the file extension to match the Content-Type—is a little odd from a non-Windows OS point of view but I’m sure there’s a rational reason behind it. At the end of the day, anything that improves Windows security is a good thing for the health of both the Internet and society in general.
More recent articles
- Weeknotes: Embeddings, more embeddings and Datasette Cloud - 17th September 2023
- Build an image search engine with llm-clip, chat with models with llm chat - 12th September 2023
- LLM now provides tools for working with embeddings - 4th September 2023
- Datasette 1.0a4 and 1.0a5, plus weeknotes - 30th August 2023
- Making Large Language Models work for you - 27th August 2023
- Datasette Cloud, Datasette 1.0a3, llm-mlc and more - 16th August 2023
- How I make annotated presentations - 6th August 2023
- Weeknotes: Plugins for LLM, sqlite-utils and Datasette - 5th August 2023
- Catching up on the weird world of LLMs - 3rd August 2023
- Run Llama 2 on your own Mac using LLM and Homebrew - 1st August 2023