cache-control

Java Web Start - How to clear cache (or update the app from user's perspective)

北城以北 提交于 2019-12-20 17:40:29
问题 After the JNLP gets downloaded in the browser it becomes cached so it doesn't need to be downloaded again, which is good. However, as a consequence, if I update the JAR that the JNLP uses, users will still see the old version of the app that is in the cache. You can clear the cache by running this in the terminal: javaws -uninstall But obviously you could not expect from users to run this when your update is ready. It should be more seamless than that. One idea is to change the jnlp file name

Google Chrome does not honor cache-policy in page header if the page is displayed in a FRAME

北城以北 提交于 2019-12-19 21:27:31
问题 No matter what I do: <meta http-equiv="Cache-Control" content="no-cache" /> <meta http-equiv="Expires" content="Fri, 30 Apr 2010 11:12:01 GMT" /> <meta http-equiv="Expires" content="0" /> <HTTP-EQUIV="PRAGMA" CONTENT="NO-STORE" /> Google Chrome does not reload any page according to the page's internal cache policy if the page is displayed in a frame . It is as though the meta tags are not even there. Google Chrome seems to be ignoring these tags. Since I've gotten answers to this question on

Clear cache on back press to prevent going back on login page or previous page after logout

最后都变了- 提交于 2019-12-19 11:26:08
问题 this is bugging me for a week already. Well I just badly needed to clear the cache of the login page after the user successfully logged in and prevent user from viewing the previous page after logging out when the back button is pressed. I tried adding this codes up in my work (both index page and the login page) in codeigniter but still nothing happens header("Cache-Control: no-cache, must-revalidate"); header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); header("Pragma: no-cache"); as well as

HTTP “Expires” header does not work in Chrome

最后都变了- 提交于 2019-12-18 18:55:32
问题 My system is Windows 7 x64, Chrome 20.0.1132.57 m. In my HTTP response header, I have: Cache-Control: public, max-age=1000 Expires: *some date* In IE & FF, the page is cached in local, and when I try to access again by typing the URL and hit enter, no request is send and the page is displayed correctly. But in Chrome, it always send a request to the server with the following header: Cache-Control: max-age=0 I do not want the client send a request to my server and then reply 304. I want to

Most Efficient Way Of Clearing Cache Using ASP.NET

六月ゝ 毕业季﹏ 提交于 2019-12-18 14:12:15
问题 I am building an ASP.NET/Umbraco powered website which is very custom data driven via entity framework, we are having to cache quite a lot of the data queries (For example searches by keyword) as it's a busy site. But when a user creates a new data entry, I need to clear all the cached queries (Searches etc..) so the new entry is available in the results. So in my create, delete and update methods I am calling the following method: public static void ClearCacheItems() { var enumerator =

Right out of the box cache-control header filter?

耗尽温柔 提交于 2019-12-18 13:27:19
问题 Is there a right of the box cache-control response header filter that will enable me to set those cache headers on my static resources without me having to build my own Filter? It seems like such a common task. Is there a Spring filter ? I am currently using Tomcat 6.0 and using Spring's ShallowEtagHeaderFilter to set etag to my resources but I need to also add the cache-control headers. 回答1: Use mvc:resources for static files and mvc:interceptors with WebContentInterceptor for non-static

Amazon S3: Cache-Control and Expiry Date difference and setting trough REST API

孤街浪徒 提交于 2019-12-18 13:22:46
问题 I want to enhance my sites loading speed, so I use http://gtmetrix.com/, to check what I could improve. One of the lowest rating I get for "Leverage browser caching". I found, that my files (mainly images), have problem "expiration not specified". Okay, problem is clear, I thought. I start to googling and I found that amazon S3 prefer Cache-Control meta data over Expiry date (I lost this link, now I think maybe I misunderstood something). Anyway, I start looking for how to add cache-control

How to add headers in nginx only sometimes

限于喜欢 提交于 2019-12-18 11:59:09
问题 I have a nginx proxy to a API server. The API sometimes sets the cache control header. If the API hasnt set the cache control I want nginx to override it. How do I do that? I think I want to do something like this, but it doesnt work. location /api { if ($sent_http_cache_control !~* "max-age=90") { add_header Cache-Control no-store; add_header Cache-Control no-cache; add_header Cache-Control private; } proxy_pass $apiPath; } 回答1: You cannot use if here, because if , being a part of the

Expires vs max-age, which one takes priority if both are declared in a HTTP response?

不打扰是莪最后的温柔 提交于 2019-12-18 11:07:43
问题 If a HTTP response that returns both Expires and max-age indications which one is used? Cache-Control: max-age=3600 Expires: Tue, 15 May 2008 07:19:00 GMT Considering that each one refers to a different point in time. 回答1: See this answer: Difference between three .htaccess expire rules If a response includes both an Expires header and a max-age directive, the max-age directive overrides the Expires header , even if the Expires header is more restrictive. This rule allows an origin server to

Expires vs max-age, which one takes priority if both are declared in a HTTP response?

十年热恋 提交于 2019-12-18 11:07:18
问题 If a HTTP response that returns both Expires and max-age indications which one is used? Cache-Control: max-age=3600 Expires: Tue, 15 May 2008 07:19:00 GMT Considering that each one refers to a different point in time. 回答1: See this answer: Difference between three .htaccess expire rules If a response includes both an Expires header and a max-age directive, the max-age directive overrides the Expires header , even if the Expires header is more restrictive. This rule allows an origin server to