开发者

How to prevent .kml files from being cached on an IIS7 server?

Right now the .kml f开发者_StackOverflow中文版iles that I use for a Google Maps implementation on my site are being cached for 7 days because the Cache-Control header within IIS7 is set to 7 days (as per these instructions).

I could use version control to update the .kml files when changes are made, but I would rather not because other people might want to refer to them.

Can I configure IIS7, or make a configuration change to the .kml file in order to remove the caching, or set it to a very short period?


You can set/change the expire headers at a per directory basis in IIS.

The easiest way to accomplish what you want is to create a new directory where you serve the .kml files from. Remove the expire headers from that directory.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜