Chrome Access-Control-Allow-Origin error

I was trying to use the jQuery load function in Chrome (on Windows) when I encountered the following error:

XMLHttpRequest cannot load file:///C:/Projects/test/about.html. Origin null is not allowed by Access-Control-Allow-Origin.

I discovered that I had to disable web security in chrome by closing ALL currently running instances of chrome and then running chrome with the – -disable-web-security parameter:

Chrome would then display the following warning header once it was loaded:
Chrome warning

Note: I would only recommend this option for development purposes. Please do not use this option for every day browsing.

Leave a Reply

Your email address will not be published. Required fields are marked *