21 November 2008

Ajax GET request - caching problem

Caching problem with AJAX GET request, to solve it append random string to request:

objXmlHttp=new XMLHttpRequest();
xmlHttp=GetXmlHttpObject(stateChanged)
xmlHttp.open("GET", url+'?nocache='+new Date().getTime() , true)
xmlHttp.send(null)

No comments: