Google+

Content Types For HTML Link

Leave a comment

29 November 2002 by Ian Davis

I was poking around this website and I noticed that I didn’t have the correct MIME types set up for my RSS or for the RDF that is scattered around. I have link tags in my HTML head section that point to my RSS file:

<link rel="alternate"
      type="application/rss+xml"
      title="RSS"
      href="http://InternetAlchemy.org/index.rss" />

The type attribute on the link tag says that the content pointed to by this link should be of type application/rss+xml, which it wasn’t!

To help diagnose these kind of problems I wrote a short CGI script that fetches a page and parses it to detect <link>, <script> and <object> tags, fetch the content pointed to by the tag and compares its mime type with that specified in the type attribute.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 1,721 other followers

%d bloggers like this: