Reputation: 1
In my html code I made a button to one of my other html codes. But I want to hide the path in browser. Is that possible with html?
Now is it this.
file:///C:/Users/Matteo/Desktop/programs/html/Matteo.html
And I want to change it to this.
Matteo.html
Upvotes: 0
Views: 133
Reputation: 6597
Not sure if I'm understanding your question correctly...
You can use relative URIs if you know the directory structure for example, if the file Matteo.html
is in the same directory as the currently opened file, you can replace file:///C:/Users/Matteo/Desktop/programs/html/Matteo.html
with just Matteo.html
. If that file is opened and you want to open file:///C:/Users/Matteo/Desktop/programs/a/b/c.html
, you can replace that with ../a/b/c
.
Upvotes: 0
Reputation: 944111
No.
The browser has to resolve the relative URL into an absolute URL in order to know which path to ask for and which server to ask for it.
Of course, it will only resolve to a file:
scheme URL if it is a local file that isn't public facing in the first place. So there is no need to be concerned about leaking information about the structure of your personal hard drive.
Upvotes: 1