how to clear the cache data when using ajax?

前端 未结 6 2100
星月不相逢
星月不相逢 2021-01-25 17:44

I am using Ajax to retrieve the data from server as below based on some ID to perform auto suggest function. however when i submit the form and update the database, the auto sug

6条回答
  •  再見小時候
    2021-01-25 18:04

    Works with IE8

    xmlHttp.open("GET", URL, true);
    xmlHttp.setRequestHeader("Cache-Control", "no-cache");
    xmlHttp.setRequestHeader("Pragma", "no-cache");
    xmlHttp.setRequestHeader("If-Modified-Since", "Sat, 1 Jan 2000 00:00:00 GMT");
    

提交回复
热议问题