开发者

how to force query urls to bypass safari cache?

开发者 https://www.devze.com 2023-01-25 07:02 出处:网络
I\'m implementing a simple web site based on python simplewebserver, that I\'m planning to use through mobile safari (iPad).

I'm implementing a simple web site based on python simplewebserver, that I'm planning to use through mobile safari (iPad).

The web page issues events to the webserver in the form of queries. So the page.html has links in the form of

<a href="page.html?event1">genera开发者_StackOverflowte event 1</a>
<a href="page.html?event2">generate event 2</a>

The problem I'm having is that safari seems to be caching the "page.html?eventn", so after the first time, it does not issue the query to the server at all.

How do I force the web client to issue the query every time?


You need to set the 'Expires' header on the web server to a date in the past. The browser will then make a request to the server every single time rather than trying to serve a copy out of the local cache.

Hope this helps.

0

精彩评论

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