C# 利用web后台阻止页面缓存

 

 

把一下代码加入到页面PageLoad中即可,其实写在前台HTML <header>标签内也可

  
    
Response.Expires = 0 ;
Response.AddHeader(
" pragma " , " no-cache " );
Response.AddHeader(
" cache-control " , " private " );
Response.CacheControl
= " no-cache " ;

 

你可能感兴趣的:(页面缓存)