HTML prefetch preloads invalid records

Added in link:

<link rel="prefetch" href="/view/search.html" />

Preloading caches the content to the browser, 

However, if the cached content has expired, the browser will still request the server to fetch the content.

That is, 

When using preloading, you also need to set the cache time of the page:

Cache-Control: max-age=1800
Expires: Sun, 22 Apr 2018 11:28:12 GMT
Last-Modified: Sun, 22 Apr 2018 10:58:12 GMT

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324735235&siteId=291194637