How to enable loading local file using ajax in IE9

user1589188 picture user1589188 · Aug 10, 2012 · Viewed 9.3k times · Source

I know there is the origin problem, but setting up a web server is not an option here. Firefox v14 has no problem loading a local file. Chrome has no problem after adding '--allow-file-access-from-files' Is there any way to fix also IE9? Thank you


Edit: I figured out the solution. Just use ActiveXObject("MSXML2.XMLHTTP.6.0") instead of XMLHttpRequest() for IE9 to overcome the local file access deny problem.

Answer

Robin Maben picture Robin Maben · Aug 10, 2012

Ajax or not. HTTP is a client-server application protocol. Without a server, that's just not possible.

UPDATE:

Possible in chrome (and firefox) apparently. As for IE you can read up on Mark of the Web.