homepage Welcome to WebmasterWorld Guest from 174.129.103.100
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / Browsers / Opera Browser Usage and Support
Forum Library, Charter, Moderator: open

Opera Browser Usage and Support Forum

    
How Opera deals with trying to import non existent CSS files
Some very unusual behaviour!
BlobFisk




msg:3354483
 12:00 pm on May 31, 2007 (gmt 0)

I happened upon a very interesting Opera quirk that took a while to diagnose!

Due to interesting nuances with RPM (long story), a developer decided to add an @import link to a non-existent CSS file that would be included at a later date. During testing we saw some interesting results with the page rendering, things being positioned in the wrong place etc.

So, turning on Operas very nice Developer Console, I looked to see what was happening. Opera showed the CSS files it was asked to link to and there was the link to the non-existent file. However, when I clicked on the show rules button I saw some unexpected results!

I would have expected to see nothing, but instead I saw some CSS rules. These rules were coming from the Apache custom 404 page, which has some CSS in the head!

It seems that Opera, looking for a file (with content type text/css), received a 404 page which contained some text/css content which it applied to the page!

This seems like very odd behaviour. The W3C has no specification or recommendation on what user agents should do in the case of a linked CSS file not being present. IE and Firefox/Mozilla do nothing and accept the omission, Opera seems to be far more hungry with it's search for some CSS to pull in!

Now, I know that it is bad practise to try to link/import files which don't exist - and I have flogged the developer in question ;) - but is Opera doing the right thing here? Opera is excellent for standards adherence and forces us to be very exact with our code, but surely looking at the HTTP response, seeing 404 instead of 200, should have meant that it didn't try to seek for some, any CSS!

 

tedster




msg:3354842
 5:42 pm on May 31, 2007 (gmt 0)

That is some strange stuff!

I agree that the 404 should be enough for Opera to give up. Maybe it's a bug, and not a feature.

Mitchman




msg:3358844
 8:04 am on Jun 5, 2007 (gmt 0)

Sounds like a bug, or undesired behaviour perhaps. Please report it at [bugs.opera.com...]

Mitchman




msg:3358849
 8:08 am on Jun 5, 2007 (gmt 0)

According to QA, this has most likely been fixed for "kestrel" (next major release of Opera)

tedster




msg:3359337
 6:05 pm on Jun 5, 2007 (gmt 0)

Thanks, Mitchman. It's nice to have someone here from behind the scenes at Opera.

BlobFisk




msg:3360240
 4:05 pm on Jun 6, 2007 (gmt 0)

Thanks Mitchman!

Logged it as a bug and really glad to hear that it's being fixed!

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Browsers / Opera Browser Usage and Support
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved