expires-header

How to configure jetty as css/js file server with expires header?

↘锁芯ラ 提交于 2020-01-05 03:18:07
问题 <Configure class="org.eclipse.jetty.server.handler.ContextHandler"> <Set name="contextPath">/</Set> <Set name="resourceBase"><SystemProperty name="jetty.home" default="."/>/webapps/foo</Set> <Set name="handler"> <New class="org.eclipse.jetty.server.handler.ResourceHandler"> <Set name="cacheControl">max-age=3600,public</Set> </New> </Set> <Set name="virtualHosts"> <Array type="java.lang.String"> <Item>foo.bar</Item> </Array> </Set> </Configure> This is my configuration, but no expires header

How to configure jetty as css/js file server with expires header?

纵然是瞬间 提交于 2020-01-05 03:17:03
问题 <Configure class="org.eclipse.jetty.server.handler.ContextHandler"> <Set name="contextPath">/</Set> <Set name="resourceBase"><SystemProperty name="jetty.home" default="."/>/webapps/foo</Set> <Set name="handler"> <New class="org.eclipse.jetty.server.handler.ResourceHandler"> <Set name="cacheControl">max-age=3600,public</Set> </New> </Set> <Set name="virtualHosts"> <Array type="java.lang.String"> <Item>foo.bar</Item> </Array> </Set> </Configure> This is my configuration, but no expires header

Expires header for Facebook JS SDK and Google Analytics

北城余情 提交于 2019-12-22 05:45:09
问题 We all know adding a far-future expiration date to static resources is a good practice to increase our websites' page load speed. So we've ensured it for all of our resources BUT the all-too-common Facebook JS SDK and Google Analytics don't do that and thus lower the entire page's speed score. Examining the headers shows Facebook do 20 minutes: Cache-Control public, max-age=1200 Connection keep-alive Content-Type application/x-javascript; charset=utf-8 Date Tue, 23 Sep 2014 04:46:38 GMT Etag

ETag vs Header Expires

夙愿已清 提交于 2019-12-17 02:51:51
问题 I've looked around but haven't been able to figure out if I should use both an ETag and an Expires Header or one or the other. What I'm trying to do is make sure that my flash files (and other images and what not only get updated when there is a change to those files. I don't want to do anything special like changing the filename or putting some weird chars on the end of the url to make it not get cached. Also, is there anything I need to do programatically on my end in my PHP scripts to

Negative Specific FilesMatch in Apache2

瘦欲@ 提交于 2019-12-11 06:28:22
问题 I want to set expiry date for all file except the 2-3 files how to use negative filematch in apache2 <FilesMatch "^(jquery-2.1.1.min.js|home_bg.png|jquery.ui.widget.js|jquery.placeholder.js|jquery.jscrollpane.js|jquery-ui-1.10.4.custom.min.js)$"> ExpiresActive on ExpiresDefault "access plus 1 month" </FilesMatch> Right now I make this happen by adding all other to file match list. Is there anyway to use something like FilesNotMatch <FilesNotMatch "^(style.css|responsive.css)$"> ExpiresActive

Changes in htaccess Expires header not reflecting in browser

半腔热情 提交于 2019-12-10 12:22:38
问题 I have set all JS on my site to cache for one week. However, there are specific files that I need to be refreshed at a higher frequency. Hence I have used FilesMatch to effect the exception in my .htaccess file: <IfModule mod_expires.c> ExpiresActive on ExpiresDefault "access plus 1 month" # CSS ExpiresByType text/css "access plus 1 year" # Data interchange ExpiresByType application/json "access plus 0 seconds" ExpiresByType application/xml "access plus 0 seconds" ExpiresByType text/xml

Expires header for Facebook JS SDK and Google Analytics

笑着哭i 提交于 2019-12-05 05:59:08
We all know adding a far-future expiration date to static resources is a good practice to increase our websites' page load speed. So we've ensured it for all of our resources BUT the all-too-common Facebook JS SDK and Google Analytics don't do that and thus lower the entire page's speed score. Examining the headers shows Facebook do 20 minutes: Cache-Control public, max-age=1200 Connection keep-alive Content-Type application/x-javascript; charset=utf-8 Date Tue, 23 Sep 2014 04:46:38 GMT Etag "566aa5d57a352e6f298ac52e73344fdc" Expires Tue, 23 Sep 2014 05:06:38 GMT and Google Analytics do 2

IIS 8.0 add both Expires header and Cache-Control

冷暖自知 提交于 2019-12-02 04:33:22
问题 i can see stackoverflow add's both Expires and Cache-Control for their images , css, js etc, so i am trying to do the same, i tried this article web.config <location path="Content"> <system.webServer> <staticContent> <clientCache cacheControlCustom="public" cacheControlMode="UseMaxAge" cacheControlMaxAge="365.00:00:00" /> <clientCache cacheControlMode="UseExpires" httpExpires="Mon, 01 May 2023 00:00:00 GMT" /> </staticContent> </system.webServer> </location> when i try to acess a css file in

IIS 8.0 add both Expires header and Cache-Control

好久不见. 提交于 2019-12-02 01:08:29
i can see stackoverflow add's both Expires and Cache-Control for their images , css, js etc, so i am trying to do the same, i tried this article web.config <location path="Content"> <system.webServer> <staticContent> <clientCache cacheControlCustom="public" cacheControlMode="UseMaxAge" cacheControlMaxAge="365.00:00:00" /> <clientCache cacheControlMode="UseExpires" httpExpires="Mon, 01 May 2023 00:00:00 GMT" /> </staticContent> </system.webServer> </location> when i try to acess a css file in content folder : http://localhost:11111/Content/bootstrap.min.css i get the following error Error :

How to set expires headers to all images in a bucket in Amazon S3

狂风中的少年 提交于 2019-11-29 20:58:16
We have around 10,000+ images in a bucket in Amazon S3, how can I set the expires header on all of the images in one go? Mauvis Ledford Just a heads up that I found a great solution using the AWS CLI: aws s3 cp s3://bucketname/optional_path s3://bucketname/optional_path --recursive --acl public-read --metadata-directive REPLACE --cache-control max-age=2592000 This will set the Cache-Control for 30 days. Note that you have the option to copy or replace the previous header data. Since AWS will automatically include the right meta content-type data for each media type and I had some bad headers I