You may want to note that in prototype.js 1.6 you need to change
setRequestHeaders: function() {
var headers = {
‘X-Requested-With’: ‘XMLHttpRequest’,
‘X-Prototype-Version’: Prototype.Version,
‘Accept’: ‘text/javascript, text/html, application/xml, text/xml, */*’
};
to:
setRequestHeaders: function() {
var headers = {
‘If-Modified-Since’: ‘Thu, 1 Jan 1970 00:00:00 GMT’,
‘X-Requested-With’: ‘XMLHttpRequest’,
‘X-Prototype-Version’: Prototype.Version,
‘Accept’: ‘text/javascript, text/html, application/xml, text/xml, */*’
};
Prototype EXample
var request = new Ajax.Request(sUrl,
{
method :'get',
onSuccess :onSuccess,
onFailure :onFailure,
parameters :{vid:vehicleid,c:cc},
requestHeaders :['Cache-Control','no-cache','Expires','0','If-Modified-Since','0']
}
);