Interpreting Accept Headers as intended in IE and Webkit
Posted
by Jrgns
on Stack Overflow
See other posts from Stack Overflow
or by Jrgns
Published on 2009-09-09T06:49:54Z
Indexed on
2010/05/10
11:04 UTC
Read the original article
Hit count: 202
I developed a web app that responds with data in the format as specified by the client in the HTTP Accept Headers. Everything worked fine while using Firefox, but when I wanted to check my CSS / HTML on Chrome and IE, both of them wanted to download the index page, as if it's an unknown content type.
After some research I found this article, which states that IE sends out a lot of crud in it's HTTP Accept headers, amongst others a list of image/*
content types right at the start.
This caused my web app to try to send the index page as an image/jpeg
.
So how do I know when to ignore and when to use the Accept Headers?
© Stack Overflow or respective owner