My website utilizes ASP. I have a link to a PowerPoint file within my website's file structure. The file is replaced every day with an updated version, but when users click on the link, the browser displays the c开发者_运维知识库ached version if they have visited before. How can I ensure that the updated version is loaded without asking the user to clear his or her cache?
I assume you're using IIS. How you do it depends on exactly which version of IIS you're using, but let's assume version 6 (i.e. the one that comes with Windows Server 2003).
You open up the Internet Information Services Manager, and find the file you want to modify the caching settings for (or you can do it on the folder that contains the file - for example, if you want to do all files in a directory, which is pretty common). Right click the file (or folder) and select "Properties". Then, on the HTTP Headers tab, check the "Enable content expiration" checkbox and change the settings to "Expire after 1 Day" or whatever you think is appropriate (maybe after an hour makes more sense).
In newer versions of IIS (e.g. the one that comes with Windows Server 2008) it's a bit different, but hopefully you should be able to figure it out from the description above.
精彩评论