1

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 site: 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/

Jay
  • 1,286
  • 2
  • 11
  • 20
  • I just tried FF4 on few of my sites too, but they are displaying not correctly. Some CSS and jQuery components are not working at all. What's going on? – ericbae Mar 23 '11 at 12:19
  • @ebae - I would suspect a bug (or several bugs) in FF4. Is it a full release or just a release candidate? – ChrisF Mar 23 '11 at 12:20
  • Firefox 4 has just been released yesterday http://www.mozilla.com/en-US/firefox/new/ – Please treat your mods well. Mar 23 '11 at 12:22
  • fwiw, my company's 20 client web sites, including mobile, all run fine with FF4. But without a link, we can only guess at your issue. – Rob Mar 23 '11 at 12:26
  • @ChrisF: while some bugs are to be expected, I wouldn't expect such an obvious bug. – Joachim Sauer Mar 23 '11 at 12:27
  • @Joachim - neither would I, which is why I queried the status. I've seen a few questions on FF4 on Super User too - some of which have "RC" in their title. I haven't got FF installed on this machine to check myself. Having said that serious bugs sometimes do get left in released products. – ChrisF Mar 23 '11 at 12:29
  • I think the problem has to be with your server as I am not having the same problem with FF4 on my site. I do get the problem on your site though (so the problem is real). – Tundey Mar 23 '11 at 12:51
  • By the way, when I tried to go to your main site (http://www.cvps.com) in FF4, I get redirected to the mobile site. So something's going on with your site thinking FF4 is a mobile browser. – Tundey Mar 23 '11 at 12:53
  • Tundey - yeah, not sure what is going on with the homepage, that is why I didn't link to that page directly. I do have mobile detection and redirect on the homepage (default.aspx), but I figure that once I figure out the bigger problem that page won't redirect. – Jay Mar 23 '11 at 13:25
  • Well, I see the page just fine and am not redirected anywhere. – Rob Mar 23 '11 at 17:14

2 Answers2

0

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.

Spudley
  • 166,037
  • 39
  • 233
  • 307
0

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.

Jay
  • 1,286
  • 2
  • 11
  • 20
  • The 51degrees.mobi beta does not detect Firefox 4. It considers it to be a mobile device. Updating to the stable v1.0.0.0 should fix it. However, the issue the OP is describing isn't particular only to 51degrees.mobi sites. It seems to be a bug in FF. – arviman Mar 28 '11 at 18:56
  • Here is a related question: http://stackoverflow.com/questions/5481500/wurfl-not-detecting-firefox-4-successfully – James Lawruk May 09 '11 at 19:19