Microsoft Knowledge Base Article
This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved.
Terms
of Use |
Trademarks
Article ID: 319384 - Last Review: June 26, 2008 - Revision: 4.0
Pages do not expire as expected after you change Web site content
This article was previously published under Q319384
If you change content on a Web site, the changes do not appear as expected. Instead, Internet Information Services (IIS) 5.0 and later versions of IIS return the old content.
This can occur if HTTP compression is enabled on the Web server. Enabling HTTP compression introduces a new metabase key named
HcCacheControlHeader. The default value of
HcCacheControlHeader is set to
max-age=86400 (that is, 86400 seconds). This means that the Web site stays in the cache of the browser for 24 hours.
- On your server, open a command prompt.
- Change to your X:\InetPub\AdminScripts folder, where X is the drive that you specified for your IIS documents.
- Run the following command:
CSCRIPT.EXE ADSUTIL.VBS SET W3SVC/Filters/Compression/Parameters/HcCacheControlHeader "max-age=0"
Note In IIS 7.0, the name of the configuration key is CacheControlHeader. If the IIS 6 Management Compatability role is installed, run the command in step 3 to modify its value. Otherwise, use the Appcmd.exe tool.
- Stop and restart the IISAdmin service.
- Restart the WWW service.
If the client refreshes the content (for example, by pressing the F5 key), the IIS cache is updated and shows the changed content.
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
Setting the value of
Response.Expires to
0 in the relevant ASP page does not resolve the issue.
APPLIES TO
- Microsoft Internet Information Services 7.0
- Microsoft Internet Information Services 6.0
- Microsoft Internet Information Services 5.0
Community Feedback System
Very often, it takes hours to solve a problem. Very often, you've looked high
and low, and have tried a lot of solutions. When you finally found it, chances
are, it was because someone else helped you. Here's your chance to give back.
Use our community feedback tool to let others know what worked for you and what
didn't.
Please also understand that the community feedback system is not warranted to be
correct, it's simply a system that we've built to let people try and help each
other. If something in a feedback response doesn't make sense to you, or you're
not comfortable making changes that the feedback talks about (like registry
edits), please consult a professional.
Thank you for using kbAlertz.com Feedback System.
-- Scott Cate