Prototype Ajax.Request modifying header

Read Time:18 Second
new Ajax.Request({ajax-url}, {
requestHeaders: {
"Accept": 'application/json'
, "User-Agent": {custom-user-agent}
onCreate: function(){},
onComplete: function(){},
onSuccess: function(data){},
onFailure: function(){}


Point: “User-Agent”: {custom-user-agent}
ex) Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv: Gecko/20100401 Firefox/3.6.3 (FM Scene 4.6.1)

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.