Reputation: 8424
I have this ajax request:
$.ajax({
dataType: 'json',
error: function(result) {
alert('Error: ' + result.status);
},
type: 'GET',
data: "",
success: function(data) {
//do some stuff
},
url: 'info/' + hash + '.json'
});
And while in Firefox this works great, in Chrome I get a 404 error, how can I fix it to work in Chrome too?
Upvotes: 0
Views: 1061
Reputation: 5912
try to use a full url-
url: 'http://yoursite.com/YourDirectorys/info/' + hash + '.json
or a none relative url-
url: '/YourDirectorys/info/' + hash + '.json
Upvotes: 1