Possible Duplicate:
“Origin null is not allowed by Access-Control-Allow-Origin” in Chrome. Why?
I am fairly new to jquery and javascript in general. I am building an offline site but would like to use ajax for the online site.
However, I am finding that jquery load() is giving me an error when trying to attempt offline:
Here is my code:
$('.container').load('somecontent.html', function(){
everythingelse();
});
var everythingelse = function() { blah blah }
And here is my error:
XMLHttpRequest cannot load file:///Users/me/Desktop/somecontent.html. Origin null is not allowed by Access-Control-Allow-Origin.
I assume that this is because I am not behind any server.
My questions are:
- What does the error mean?
- Is there a way to use jquery load() when offline? alternative method? or something that acts similar?
I want to load the contents of an html file into another html file locally! and without a server.
[EDIT] I just found out that this works flawlessly in Firefox, but chrome has the issue as pointed out by imm below.