Skip to content

Firefox decodes URIs for users?

On the “I haven’t found the documentation that explains this” front, if an anchor tag has an encoded URI as its href, Firefox (but not Chrome) will apparently interpret that for the user, including passing that into the browser bar. Here’s a super short (no sound) screencast to show what I mean:

And interestingly, using encodeURIComponent (which makes the URL not look like a URL) causes Firefox to point to [base url]/foo.com[…] instead of foo.com[…]

Security feature? What’s happening in Firefox behind the scenes?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.