how to use control-cache headers?

前端 未结 4 1304
南旧
南旧 2021-01-04 19:43

I downloaded Google speed tracer for Google chrome to see how my site does performance wise and it tells me I need to enable caching for certain files like my style.css, ima

4条回答
  •  耶瑟儿~
    2021-01-04 20:35

    I'm not familiar with this tool, however until any browser has fetched content with caching headers it won't be able to cache it. It appears that your server is sending back the expected headers and the page should be cached by the browser - your browser should now have a copy in its cache. If you try fetching the same page again then it will be fetched from the cache rather than the origin server (assuming the 1 hour time limit hasn't expired).

    Note that some browsers will interpret a refresh request as an explicit request to ignore the cache and fetch the page again - try accessing it via link rather than hitting the refresh button.

    C.

提交回复
热议问题