文件通常在浏览器的缓存中保留多长时间

编程入门 行业动态 更新时间:2024-10-25 16:23:51
本文介绍了文件通常在浏览器的缓存中保留多长时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

文件通常在浏览器的缓存中保留多长时间?我想知道总体上-我需要等待多长时间才能合理确定大多数人的缓存会重新提取文件?

How long are files usually kept in a browser's cache? I'm wondering about the general population - how long would I need to wait to be reasonable certain that most people's caches will refetch the file?

推荐答案

这在很大程度上取决于人,浏览器和设置。

It depends much on person, browser and settings.

浏览器通常为该任务保留一定数量的磁盘空间,例如12 MiB。如果用户停止使用浏览器,则它是无限期的。如果他/她很少使用浏览器,则直到到期为止-通过内部策略或HTTP标头。如果他/她大量使用浏览器,则可能需要12分钟或更短的时间。

Browsers usually reserve a certain amount of disk space, like 12 MiB, to this task. If a user stops using the browser it is indefinitely. If he/she uses the browser rarely, it will be until the expiration - either by internal policy or by HTTP headers. If he/she uses the browser heavily, it can be 12 minutes or even less.

我相信很难说一般,因为我有一个网站当时IE的市场份额超过75%,其中Firefox的条目占50%,Opera的条目占49%。如果您网站的目标受众是频繁使用浏览器的用户,那么它可能会很短。另一方面,如果您的网站只是访问过的网站,则几乎永远不会访问。

I believe that it is hard to say 'in general' as I had a website on which 50% entries were from Firefox and 49% from Opera when IE at that point had over 75% market share. If the target audience of your site are users who use their browsers heavily, it can be very short. On the other hand if your site is only website visited it can be nearly never.

更多推荐

文件通常在浏览器的缓存中保留多长时间

本文发布于:2023-11-01 20:34:48,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1550345.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:缓存   多长时间   浏览器   文件

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!