Search code examples
gwtcross-browserframebackslashslash

GWT: Difference access file paths with "/" or "\\" between IE,Chrome and FireFox


In IE and Chrome, if I set an URL "http://example.net/uploads\upload.html" to a Frame. It works fine. However, in FireFox, it will pops up an 404 error NOT_FOUND: "RequestURI=/uploads%5Cupload.html". this "%5C" should be a "\".

Finally, I change all "\" to "/", it works fine for all browsers.

Can any body explain this??


Solution

  • Probably because the backslash \ is actually invalid to be used as separator? The fact that IE and Chrome accept it doesn't valid it in any way. You should always use the forwardslash '/'. http://en.wikipedia.org/wiki/Uniform_Resource_Locator