问题描述:

In my application, every page have multiple ajax hit.

So if clicking the back button the browser treats every ajax hit as a page and render that hit again which makes the page reloads and actual page will not serve.

How to avoid ajax hit making entries in history? The following code im using for ajax

}

 if (modet == undefined) {

xmlhttp.open('POST', url, mode);

xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");

xmlhttp.send(parameters);

} else {

xmlhttp.open('GET', url, mode);

xmlhttp.send(null);

}

相关阅读:
Top