: When is a URL encoded? When there are spaces in a URL like http://example.com/this is not url enocoded it is obvious, that the URL will end up as http://example.com/this%20is%20not%20url%20encoded
When there are spaces in a URL like
example.com/this is not url enocoded
it is obvious, that the URL will end up as
example.com/this%20is%20not%20url%20encoded
When and what will encode my URL?
Should links that I create to my URL be encoded in my HTML documents?
Does the browser do the encoding?
Does the server do the encoding?
More posts by @Jessie594
2 Comments
Sorted by latest first Latest Oldest Best
While browsers can automatically make the conversion from spaces to encoded versions, you should ensure that your server software outputs correctly encoded URLs.
Not all browsers / bots can do the encoding properly.
If you do not have a CMS, you should encode the URLs in your HTML content.
Best way is to restrict to not using URLs with special characters.
Browsers will automatically encode URL's with spaces, assuming you have linked to the file properly.
Create a file on your server called test one.html link to it or simply load it directly in your browser using spaces in the URL bar. www.example.com/test one.html
It will become test%20one.html
It's not and ideal way of naming or linking to files but the browser will handle it just fine. If you have a lot of static files with spaces which you'd like to update to - dashes or hyphens. A great program to use is
www.bulkrenameutility.co.uk/Main_Intro.php
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.