cache-control

Clear cache for all possible query parameter url for specific url - CloudFlare

笑着哭i 提交于 2019-12-24 07:35:49
问题 How can I find all urls with every possible query parameters? There is specific curl command launched with terminal for do this? For example i must clear cache for url: example.com/, example.com/lang=en, example.com/lang=es, ... 回答1: If you pay for higher plans you can purge cache with wildcards, such as example.com/lang=* . Otherwise you'll have to enter each page in the list. You might be better off clearing the entire cache. 来源: https://stackoverflow.com/questions/42579658/clear-cache-for

NGINX下配置CACHE-CONTROL

余生长醉 提交于 2019-12-24 06:56:05
转载的,那个页面让关了,,没标明请谅解。 HTTP协议的Cache -Control指定请求和响应遵循的缓存机制。 在请求消息或响应消息中设置 Cache-Control并不会影响另一个消息处理过程中的缓存处理过程。 请求时的缓存指令包括no-cache、no-store、max-age、 max-stale、min-fresh、only-if-cached等。 响应消息中的指令包括public、private、no-cache、no- store、no-transform、must-revalidate、proxy-revalidate、max-age。 浏览器中关于Cache 的3 属性: Cache-Control: 设置相对过期时间, max-age指明以秒为单位的缓存时间. 若对静态资源只缓存一次, 可以设置max-age的值为315360000000 (一万年). Http 协议的cache-control 的常见取值及其组合释义: no-cache: 数据内容不能被缓存, 每次请求都重新访问服务器, 若有max-age, 则缓存期间不访问服务器. no-store: 不仅不能缓存, 连暂存也不可以(即: 临时文件夹中不能暂存该资源) private(默认): 只能在浏览器中缓存, 只有在第一次请求的时候才访问服务器, 若有max-age, 则缓存期间不访问服务器.

Dynamic <img> tags unnecessarily reloading static images

社会主义新天地 提交于 2019-12-24 03:12:51
问题 I already asked this question at <img> tag not respecting max-age, and unnecessarily reloading images and thought the comments provided a satisfactory answer, but turns out I was mistaken. In the six months since, I think I've thought up a solution, but want to check it out here before implementing it. Will it work? Is it worth implementing? Any simpler solution? etc. To briefly re-describe the problem, I have a cgi program that generates gif images for html pages with tags like the following

Dynamic <img> tags unnecessarily reloading static images

Deadly 提交于 2019-12-24 03:12:14
问题 I already asked this question at <img> tag not respecting max-age, and unnecessarily reloading images and thought the comments provided a satisfactory answer, but turns out I was mistaken. In the six months since, I think I've thought up a solution, but want to check it out here before implementing it. Will it work? Is it worth implementing? Any simpler solution? etc. To briefly re-describe the problem, I have a cgi program that generates gif images for html pages with tags like the following

Where is my max-age header coming from?

丶灬走出姿态 提交于 2019-12-23 21:35:30
问题 I'm well aware of how I could set it myself, but I am concerned about having it configured in two different places. To receive the bounty, please tell me where I should look to find the existing setting. Places we've already looked for the existing setting, without success: the web.config <StaticContent> section IIS output caching section, at all three levels: machine site application Code (I did a global search for SetMaxAge ) Context We recently noticed that our CSS and JS files aren't

Browser cache files not getting updated after a new deployment in jboss server for a web application

雨燕双飞 提交于 2019-12-23 21:14:53
问题 I am using jboss Server 7.1.1 for deploying a java web application. For js, css, font files the browser cache is not getting updated with new changes. Every time we insist the clients to clear cache in their browsers to get the new changes to effect. is there any configuration which i can configure, so that when a new code is deployed i can guide all the request to be provided with the updated file ? by googling on this topic i find that, we can write custom methods to set e-tag value. is

前端性能优化 —— 添加Expires头与Cache-control区别

非 Y 不嫁゛ 提交于 2019-12-23 17:37:14
要:添加Expires头能有效的利用浏览器的缓存能力来改善页面的性能,能在后续的页面中有效避免很多不必要的Http请求,WEB服务器使用Expires头来告诉Web客户端它可以使用一个组件的当前副本,直到指定的时间为止。 例如:Expires:Thu,15 Apr 2010 20:00:00 GMT; 他告诉浏览器缓存有效性持续到2010年4月15日为止,在这个时间之内相同的请求使用缓存,这个时间之外使用http请求。 Cathe-Control:max-age=315360000 Expires有一个非常大的缺陷,它使用一个固定的时间,要求服务器与客户端的时钟保持严格的同步,并且这一天到来后,服务器还得重新设定新的时间。 HTTP1.1引入了 Cathe-Control,它使用max-age指定组件被缓存多久, 从请求开始在max-age时间内浏览器使用缓存,之外的使用请求,这样就可以消除Expires的限制, 如果对浏览器兼容性要求很高的话,可以两个都使用。 这里对http 304 状态结合max-age做一个总结: 浏览器初次访问服务器---------------服务器返回200状态 如下图: 浏览器再次请求服务器时,浏览器会先判断max-age,如果到期则直接请求服务器,否则直接从缓存中取, 服务器收到请求后,判断文件是否被修改过,若是则直接返回200,否则返回304

What is memcached expiration behavior when keys have different time frames and the cache is full?

有些话、适合烂在心里 提交于 2019-12-23 17:18:45
问题 I know that redis will expire the keys on its own, freeing the memory and was wondering if memcached would behave the same. Let's say I have a kind of cache keys that are expired very rarely (we'll call them A), and another kind that expires every 5 minutes, using Ruby on Rails' expires_in: 5.minutes (we'll call them B) Will memcached drop the A keys if there are too many B keys ? For instance if I can store 5 values in my store, a scenario could be: Store A1 (4 values left) Store B1 (3

Cache-busting for html

廉价感情. 提交于 2019-12-23 04:31:42
问题 Ive read about this method called cache-busting that allows us to add version parameters to our js and css files so that clients wont have to clear cache every time we have an update. However, I didn`t read any about html. Is there any method that allows us to load latest html file changes without clearing the cache? P.S. I dont know about others but I just discovered that it is angularjs that is caching my templates. I posted my own solution anyway 回答1: Solved it. Just append a parameter

Cache-busting for html

时光毁灭记忆、已成空白 提交于 2019-12-23 04:31:40
问题 Ive read about this method called cache-busting that allows us to add version parameters to our js and css files so that clients wont have to clear cache every time we have an update. However, I didn`t read any about html. Is there any method that allows us to load latest html file changes without clearing the cache? P.S. I dont know about others but I just discovered that it is angularjs that is caching my templates. I posted my own solution anyway 回答1: Solved it. Just append a parameter