每次发出请求时,都可能要取出缓存的副本。
在服务器上设置正确的缓存头
header( 'Cache-Control: no-store, no-cache, must-revalidate' );header( 'Pragma: no-cache' );
或将查询字符串附加到get请求中,如下所示
ajaxRequest.open("GET", "pull.php?ts=" + new Date().getTime(), true);
每次发出请求时,都可能要取出缓存的副本。
在服务器上设置正确的缓存头
header( 'Cache-Control: no-store, no-cache, must-revalidate' );header( 'Pragma: no-cache' );
或将查询字符串附加到get请求中,如下所示
ajaxRequest.open("GET", "pull.php?ts=" + new Date().getTime(), true);