Skip to content Skip to sidebar Skip to footer

What Is The Difference In "/urlstring.html" Versus "urlstring.html" In Window.location?

I recently ran into an issue when preparing a web app to work in IE11. I've found a working solution but I would prefer to have a good reason why it worked rather than a guess. My

Solution 1:

A leading slash indicates an absolute path, i.e. a path relative to the root of the website. Without the leading slash the path is relative to the current URL.

Why it behaves differently in different browsers I can not say.

Post a Comment for "What Is The Difference In "/urlstring.html" Versus "urlstring.html" In Window.location?"