Full page reload on Post/Redirect/Get ignoring cache control

前端 未结 3 1857
名媛妹妹
名媛妹妹 2020-12-29 12:28

I have a page that loads a lot of images, css and javascript. I\'ve added a far future Expires header and set Cache-Control to public on these external dependencies so they

3条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-29 13:14

    F5 reloads all the page's resources in some browsers, so they ignore the cache headers and ask for every resource again.

    If you want to "cache" POST pages you have to convert those pages in static resources, i.e. generating a .html file from the .php for example and then serve the .html as a static resource.

    This is valid ONLY if the content of the page doesn't change

提交回复
热议问题