Ajax with jQuery works in Firefox and gets 404 error in Chrome -


i have ajax request:

$.ajax({     datatype: 'json',     error: function(result) {         alert('error: ' + result.status);     },     type: 'get',     data: "",     success: function(data) {         //do stuff     },     url: 'info/' + hash + '.json' }); 

and while in firefox works great, in chrome 404 error, how can fix work in chrome too?

try use full url-

url: 'http://yoursite.com/yourdirectorys/info/' + hash + '.json 

or none relative url-

url: '/yourdirectorys/info/' + hash + '.json 

Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -