I downloaded Firefox 4 yesterday and when I try to open my site (ASP .Net 2.0 site using masterpages) it tries to open the file rather than display the page. The message in the popup is: "You have chosen to open contactus.aspx which is a: aspx File from: 'my site'. What should Firefox do with this file?"
I am sending the following content-type: <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
I also tried changing the charset to utf-8
, same thing.
When I try to run the page through the w3 validator it gives me this message:
Warning Character Encoding mismatch!
The character encoding specified in the HTTP header (utf-8) is different from the value in the <meta> element (iso-8859-1). I will use the value from the HTTP header (utf-8) for this validation.
Is the server (IIS) somehow setting the default charset? Could this mismatch be the problem? What else can I look for? Also, one more thing, I have a mobile site running on the same server which uses "application/xhtml+xml; charset=utf-8"
as the content-type and it works fine in FF4. Thanks!
Edit: here is an example page from the si开发者_运维问答te: http://www.cvps.com/jobs.aspx
Edit 2: I think I have narrowed down the problem to the mobile detection. I am using 51 degrees mobile device detection from http://51degrees.codeplex.com/
Specifying the content type in a meta tag won't help - the browser needs to answer the question of what type it is before it looks at the contents of the file. You need to specify the content type in the server config.
Encoding can be usefully specified in the meta tag, but I'd still prefer to have it right in the server config.
The problem turned out to be with the mobile detection framework I am using (51degrees.mobi). I found a post on their support forums here that was similar to my problem and was able to fix the problem.
精彩评论