Mobile app version of vmapp.org
Login or Join
Steve110

: IE strips off parameters from a file URI pasted into an address bar? Question: How do I stop IE from stripping off parameters from file URI pasted into address bar? Description of a problem:

@Steve110

Posted in: #InternetExplorer #Url #UrlParameters

Question: How do I stop IE from stripping off parameters from file URI pasted into address bar?

Description of a problem: I have a "simpleTest.html" page with only this JS code inside, that returns the current location of the browser:

console.log("document.URL: " + document.URL);
console.log("document.location: " + document.location)
console.log("document.location.href: " + document.location.href)
console.log("window.location: " + window.location)
console.log("parent.frames.document.location: " + parent.frames.document.location)


When I paste the address to this file in IE's address bar with some parameters, for instance:

file:///pathToFile/simpleTest.html?dupa=2


The link gets changed to:

file:///pathToFile/simpleTest.html


When I paste it for the 2nd time the parameters will stay there. If however in the meantime I access some other resources, I will have to paste it 2 more consecutive times for the parameters to remain.

Moreover, after I've place the website in my local Apache and access it through HTTP, the parameters remained:
127.0.0.1/pathToFile/simpleTest.html?dupa=2

It works fine for FF and Chrome, for both file and http protocols. Any ideas about this strange behavior in IE?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Steve110

1 Comments

Sorted by latest first Latest Oldest Best

 

@Gloria169

file:/// will open a file on your drive or network drive using the OS. When using you're telling the browser that this is a hypertext link to a file located on the Internet, not locally.

You're likely seeing the parameters after several tries because IE is just saving your history.

Also, having a ? in the URL implies you have some server-side scripting involved to process the URL parameter(s), which would not run unless through a web server.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme