开发者

I want to use the same image more than once and I would like the web browser to download this image only once, how to do it?

I want to use开发者_Python百科 the same image more than once and I would like the web browser to download this image only once, how to do it?


The browser will cache the image for you - no worries.


HTTP 1.1 introduced a new class of headers, Cache-Control response headers, to give Web publishers more control over their content, and to address the limitations of Expires.

  • Make caches store images and pages that don’t change often by using a Cache-Control: max-age header with a large value.


Once the image is cached by the browser you can show that same image millions of times without having to reload it again. There's no reason to worry about this being an issue.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜