instantpage/instant.page

Expiry date

Closed this issue · 2 comments

Let's say a user hovered over a link and left the tab sitting there for a few minutes. After he comes back, if he clicks the link, he'll get the old version of the page. There should be an expiry date of cache.

@t3rmin4l, this feature is outside the scope of this plugin!

Expiry date you can set in "expires" header on your webserver (hosting) if your site consists of static pages. If its dynamic, maybe your website engine has ability to set up cache lifetime option. Be carefull, i use 5min cache for beig isure of my website's users can get fresh content!

Chrome will evict the page from the prefetch cache after 300 seconds. There’s no way to influence that alas.

What kind of content are you serving where that seems like a problem to you? If it’s really important, it might also make sense for you to implement a mechanism that updates content through Ajax (continously, and for instant.page’s purpose: right after first display). But a user hovering a link long enough for instant.page to preload it and come back to it later (but no later than 5 minutes) is an edge case.