What is %5C and why does Firefox like it so much?

I’m working on a school website, and I put in some images in it. Opens fine in IE, which the school uses: Brilliant. But when I get home, the pictures are mysteriously gone!

Horrified, I check to see that the images are still there, and that the links didn’t get malformed somehow: bingo. %5C everywhere.

Mystified, I looked at the source code, only to realise that there’s no %5C in sight. So I opened it in IE, and bingo, everything’s as it should be.

Does anyone know what went wrong with Firefox? If it’s of any interest, the website is at Page not found and yes, I know it sucks. :smiley:

%5c is one of the arcane symbols used to represent certain characters on servers. IE automatically converts it but Firefox takes it literally. %5c is the backslash (). To fix it for Firefox, make sure you use / (forward slash) instead. While Windows machines use \ to delineate folders, web standards use / to delineate folders (as does linux).

Hope this helps.

Yes, there are several places where the \ is used instead of the /, for example:


<IMG SRC=".\imgs\BarHighlights.gif">

ronincyberpunk beat me to the factual answer, so I will just add that, IMHO, the rather stricter behaviour of Firefox is to be preferred. If each browser tries too hard to accomodate small errors in HTML, the result is a web full of dodgy code which only works on a subset of browsers. Microsoft has never had a problem with being non-standard however.

In the future, you might also try running your pages thru a validator (like this one) which will show you items that do not meet official web standards. It is free, and only takes a few minutes.*

But doing so will produce much more professional-quality webpages. This ought to be important in a school envoronment, where you are learning.

  • It shows 43 errors remaining in that webpage.