Firefox "intelligently" and silently fixes incorrect file references in CSS and Scripts at runtime.

Posted by bobsoap on Stack Overflow See other posts from Stack Overflow or by bobsoap
Published on 2010-04-17T21:56:26Z Indexed on 2010/04/17 22:03 UTC
Read the original article Hit count: 174

Filed under:

Well this is a really weird issue, I really didn't find anything on this elsewhere so I thought I'd address it here.

Say I have an "image.jpg" and accidentally reference it in the CSS like so:

url(imag.jpg)

Note the missing "e". Now for me, Firefox is so incredibly clever that it will still find the correct image, but NOT SPIT OUT A WARNING. So I assume that everything is ok.

But later, when I test the page in any other browser, all of a sudden the image doesn't display (and rightly so). That's because Firefox thought it was a good idea to correct my error without telling me.

This becomes more critical with scripts. Firefox will also auto-correct a typo in a reference.

I just wasted a whole hour scratching my head and trying to debug an ajax function in Webkit - turns out, I just had a typo where I included the file.

Why on earth does Firefox do this without telling, and where the heck can I turn this off? This has first occured somewhere around FF 3.0 and still persists in 3.6.3.

/rant an thank fo any inpu ;)

© Stack Overflow or respective owner

Related posts about firefox