2012-04-16 13 views
0

完美的作品在Firefox和Chrome浏览器却用越来越奇怪,即问题。 我测试了自己很多次,即6,7,8和9似乎作品给我。当客户端请求的页面和功能调用有时有时并不面临的问题。jQuery的AJAX缓存假,但问题与下面的代码即bassed浏览器

Close:function() { 

    $.ajax({ 
     url: 'URL', 
     cache: false, 
     success: function (data) { 
     eval(data) ; 
     if (json_data.status) { 
      CountDown.close(); 
      } 
     else { 
      setTimeout(CountDown.Close, 1000); 
      } 
     }, 
     error: function() { setTimeout(CountDown.Close, 1000); } 
    }); 

    }, 

回答

0

缓存问题,AJAX和IE在这个世界上太多了,你有一些事情,应该可以帮助你解决这个问题。

你可能尝试了很多的下面:

在HTML页面中添加这些元标签:

<meta http-equiv="cache-control" content="no-cache" /> 
<meta http-equiv="pragma" content="no-cache" /> 
<meta http-equiv="expires" content="-1" /> 

添加这些响应头到名为网址的应用:

Cache-control: no-cache 
Expires: Expires: Thu, 01 Dec 1994 00:00:00 GMT

如果你是IIS中的发展,设置在应用程序Web.Config此项:

<system.web> 
    <caching> 
     <outputCacheSettings> 
      <outputCacheProfiles> 
       <add name="CacheProfile1" duration="60" /> 
      </outputCacheProfiles> 
     </outputCacheSettings> 
    </caching> 
<system.web> 
+0

等待results.thank你。 – memo 2012-04-16 22:41:49