Internet Explorer shows error message when I try to open local html file with parameters

I have an offline htd page on my hdd with some javascript that does different things depending on URL parameters. when I open this page in firefox and opera, everything works fine, but IE does not allow me to attach anything to the url. it shows an error that says: β€œWindows cannot find theβ€œ file name. ”I think IE takes it for the file, and the file with .html? Param = val cannot be found.

Do I need to change any IE parameter so that it recognizes the html file and its parameters?

+3
source share
1 answer

This is because the protocol file:///used by Windows to access local files does not support parameter values. This is because it is file:///not a protocol (for example, the HTTP protocol uses it GET /.../?param=value HTTP/1.1) at all, but it is an interface used internally to request files.

I recommend using #instead ?, since anchors (this is called #) are supported in both HTTP and the file protocol.

+5
source

Source: https://habr.com/ru/post/1735987/


All Articles