AJAX problem in IE9?

后端 未结 1 1793
余生分开走
余生分开走 2020-12-20 09:16

I have made an AJAX chatroom; and it works in chrome and FF, but of course, not in IE. Here\'s my code:



        
1条回答
  •  囚心锁ツ
    2020-12-20 09:37

    Probably yanking out a cached copy every time you make a request.

    Either set the correct caching headers on the server

    header( 'Cache-Control: no-store, no-cache, must-revalidate' );
    header( 'Pragma: no-cache' ); 
    

    Or append a query string to the get request like the following

    ajaxRequest.open("GET", "pull.php?ts=" + new Date().getTime(), true);
    

    0 讨论(0)
提交回复
热议问题