1

I have a fairly straightforward page (http://www.kwatee.net) that renders ok with Firefox, Opera, Safari and IE but has problems with chrome (v17.0.963.56). I saved the page locally and loaded it (file:///...) and it renders as expected in Chrome!

I had a look with the Chrome developer tools and it looks like, for some reason, Chrome does not 'see' one of my style sheets (stylesheet.css) online but it's happy with the page after I save it locally.

mac
  • 5,627
  • 1
  • 18
  • 21
  • 2
    I have just come accross a bug report (http://code.google.com/p/googleappengine/issues/detail?id=6655) that explains the problem of Appengine returning a null mime-type for css files – mac Feb 22 '12 at 19:40

4 Answers4

1

Your site does not render properly in Safari Mac which is also a Webkit browser like Chrome.

I tried pulling up your stylesheet in Safari (Mac) and it downloaded to my desktop instead of displaying its contents. This is not normal behavior. Strangely, your other stylesheet displays just fine.

The main difference is the blank line at the start of stylesheet.css... it should not matter but remove the blank line just to be sure.

However, I cannot reproduce the issue on my account, so thoroughly check your server settings. (I uploaded your exact same stylesheet.css to my own hosting account and pulled it up in my browser via URL. It displayed in the browser and did not download to my desktop. This suggests something is setup differently on your server.)


Side-issue: I also see that your page does not validate.

You need to fix the <html> tag as per the validation error

<html xmlns="http://www.w3.org/1999/xhtml">

And also remove all the whitespace above your doctype as IE will go into quirks or compatibility mode otherwise.

Sparky
  • 98,165
  • 25
  • 199
  • 285
  • The side-issue did the trick! Adding the xmlns="http://www.w3.org/1999/xhtml" fixed everything. I forgot to mention that my site is running under Google AppEngine and that it worked fine when running locally in debug mode. The google doc insisted on using the " declaration at the head of each file but said nothing (at least I saw nothing) about the xmlns attribute. Thanks – mac Feb 22 '12 at 19:04
  • @mgc, I'm glad you got it working but that could not have fixed your issue. Your HTML code does not even come into play when accessing your style-sheet URL directly in the address bar. As I, and others, have suggested, your server is not transferring the stylesheet with the correct MIME type. – Sparky Feb 22 '12 at 19:08
  • I had accidentally sent an incomplete response (it is complete now). Without a doubt the xmlns attribute did the trick. The only thing I did before was to remove the blank line at the top of stylesheet.css but it did nothing as expected. As I said, there may be some interpretation by Appengine along the way. – mac Feb 22 '12 at 19:11
  • I retract what I said. It seems to have worked only transiently because after another minor update to fix some of the markup issues the same issue came back. I will dig further – mac Feb 22 '12 at 19:25
  • Sorry for being so verbose but there's one more unusual behavior: even though both chrome and safari are based on webkit, when I access stylesheet.css directly I get the download dialog but in chrome it shows up fine – mac Feb 22 '12 at 19:28
  • @mgc, That's weird. I don't understand how this problem could be specific to your browser when all of a sudden, my browser no longer shows the problem. I think there were multiple causes with the same symptom. – Sparky Feb 22 '12 at 23:03
  • like I said in an edit of my question, it was an appengine-specific bug. I upgraded my sdk to the latest 1.6.2.1 as christian suggested, re-uploaded my site, and voila. – mac Feb 22 '12 at 23:38
  • @mgc, I understand what you're saying... I just don't know enough about the SDK to figure out how that could cause it to start working again from my own browser's perspective. – Sparky Feb 23 '12 at 00:36
1

I am also using Chrome, so I did a little digging and it is giving me this error: "Resource interpreted as Stylesheet but transferred with MIME type text/plain: "http://www.kwatee.net/stylesheet.css"." (Open the chrome developer tools, goto console, and reload the page)

For some reason the server is not sending the correct MIME type, the networking tab confirms this. I would check the server-side settings, or test simply removing the type property or changing it to type="text/plain"

See also:

resource interpreted as stylesheet but transferred with mime type text plain issue?

Chrome says "Resource interpreted as script but transferred with MIME type text/plain.", what gives?

Community
  • 1
  • 1
Nathan Goings
  • 1,145
  • 1
  • 15
  • 33
1

The problem is fixed with version 1.6.2.1 of appengine sdk

christian
  • 36
  • 3
0

Your web-server is currently returning "null" as Content-Type for CSS files.

Try to setup web-server to return proper Content-Type header. For Apache server, this can be done by adding following line to .htaccess file:

AddType text/css .css
Marat Tanalin
  • 13,927
  • 1
  • 36
  • 52