Asking browsers to cache as aggressively as possible

后端 未结 7 864
既然无缘
既然无缘 2020-12-07 19:18

This is about a web app that serves images. Since the same request will always return the same image, I want the accessing browsers to cache the images as aggressively as po

相关标签:
7条回答
  • 2020-12-07 19:46

    A few days cache age is very low. You should set it to one year or even more. Of course this might raise problems when the image actually changes but you can solve that by adding a version number to the image and changing the page that references the image to include the path to the new image.

    I wrote more about web application caching here: http://patchlog.com/web/7-methods-to-cache-web-applications/

    0 讨论(0)
提交回复
热议问题