Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [cache-control]

The tag has no usage guidance.

1
vote
0answers
23 views

How to allow Google fonts to be cached for more than one day?

I tried this code below, but I still see the message on Google Insights that the fonts have a expiration of 1d. AddType application/vnd.ms-fontobject .eot AddType application/x-font-ttf .ttf AddType ...
1
vote
0answers
16 views

Browsers load actual website from external server and keep in cache [closed]

So, currently, I'm using 000webhost to host my website, but they only allow 1000 MB to store all the files for my website, which IMO is a little small. So, what I want to accomplish is something like ...
-1
votes
1answer
42 views

Cannot find where my site is being cached! [on hold]

So I have a bit of experience as a web master, but am at my whits end trying to find out what is caching my site. I cannot see any updates I make for the life of me. What I've tried: Clear ...
1
vote
1answer
26 views

Accelerated mobile page(AMP) and password protected admin area, Can I combine both in single page?

Full site being migrating to AMP. I want to integrate admin functionality to AMP pages, like simple links for deleting content, and huge forms(not mobile friendly) for editing content. It will be ...
2
votes
0answers
41 views

Local browser caching not working due to .htaccess rules

All the JavaScript files hosted from my server are not being cached - just those from 3rd party CDNs. The information on caching is bountiful, but I've been unable to create something that works. I'...
0
votes
0answers
24 views

CloudFlare is sending two cache headers in response

I’ve hit something strange, maybe it's a bug! My origin server is sending out this headers in response to a request: //php dump - json_encode(headers_list()) [ “Content-type: application/json”, “...
0
votes
0answers
8 views

Google is not showing Cache Version of My site [duplicate]

Google is not showing Cache Version of My site http://www.usacoverseas.com/ I am not having visible coding on the page itself. I am trying to rank this site for 4 keywords, but non of them are ...
5
votes
1answer
1k views

What happens if you don't set cache-control header?

What happens if you don't set the cache-control header? Does HTTP specify a default behaviour that clients should follow or is it up to the clients to decide? In Chrome, I have seen some Javascript ...
2
votes
1answer
53 views

How to over ride a users cache when new assets / content are available

Ive just run a google page speed test on my site and one of the things its suggested to do is use browser caching. I already do you browser caching for most large images and other assets that in ...
3
votes
3answers
1k views

Why does Pingdom suggest that I add a “Vary: Accept-Encoding” header?

I have tried a tool to measure the speed of my web site. It is Pingdom https://tools.pingdom.com There is an answer I do not understand "The following publicly cacheable, compressible resources ...
1
vote
0answers
75 views

Cache-Control not being picked up by performance analysis tools for my website (Amazon CF/S3) [closed]

So, I have this website that is hosted in Amazon S3/CF and when I run any Performance analysis tool I get the following recommendation to set browser caching in some files: So, I set in (most of the ...
3
votes
1answer
90 views

Browser Cache Control | Individual Resources

The boss suggested to read the documentation on Google Leverage Browser Cache after testing with Google Page Speed Insights ... There was a list of about 30 or so resources that need to be cached for ...
0
votes
2answers
71 views

How to enable browsing cache for my website?

I have created a website and the speed of my website is very slow. i want to enable browser cache for my website how can i do this ?
1
vote
1answer
107 views

Does the below-mentioned server header impact google indexing?

Date: Sat, 04 Mar 2017 06:26:50 GMT Server: Apache/2.4.7 (Ubuntu) X-Powered-By: PHP/5.5.9-1ubuntu4.20 Expires: Sat, 01 Jan 2000 00:00:01 GMT Cache-Control: post-check=0, pre-check=0, max-age=0 Pragma: ...
2
votes
1answer
3k views

Why is Chrome caching my login page?

Our literacy web site for kids with disabilities is causing some users issues with logging in. You can visit the site at http://tarheelreader.org/. If you login at https://tarheelreader.org/login/, ...
3
votes
3answers
276 views

Can browser caching be controlled by HTTP headers alone without using hash names for asset files?

I'm reading it in Webpack docs: The way it works has a pitfall: if we don’t change filenames of our resources when deploying a new version, browser might think it hasn’t been updated and client ...
0
votes
1answer
845 views

Amazon EC2 Bitnami Wordpress Leverage Browser Caching

Just setup a Wordpress site on an using an Amazon EC2 Bitnami AMI. I've ran the usual suspects of speed tests and have added this to my .htaccess file, like I've done dozens of times before: ## ...
1
vote
0answers
387 views

How do I implement “If-Modified-Since” header on a node server?

My web-application is running on a node server on azure. I need to implement the "If-Modified-Since" header on this server. Could you please guide me how to do this? I tried implementing by setting ...
1
vote
0answers
76 views

How to setup htaccess to show new posts on WP site?

I'm using VPS CentOS + Apache + Wordpress. Not using any Cache plugin but htaccess instead. All work good except my home page wont refresh if I write new post. Only new visitors can see new posts. ...
1
vote
1answer
46 views

What headers do I need to set to allow my content to be cached without any sort of revalidation for a set amount of time?

I'm going cross eyed looking at all the HTTP headers available for controlling the caching of content. What headers do I need to set I I want content to be cached: For at most 24 hours (or any ...
2
votes
1answer
760 views

Setting cache-control on files with no extension

We are using ExpressionEngine as a CMS. It allows you to set the "type" of the file when you create a template and when naming it, you don't have to give it an extension. I have used this to set ...
4
votes
2answers
3k views

Prevent browser from caching text file

I have a web application that runs on an Apache server on the intranet of an organisation. In this web application there is a JavaScript function that loads a specific text file via JavaScript xhttp =...
1
vote
2answers
48 views

What happens if CSS file falls out of cache but HTML file doesn't?

I have a static HTML page for which I have set a cache-control max-age of 6 months, and it calls a style_v1.css file with a max-age of a year. What happens when I update the HTML file to call my ...
1
vote
1answer
277 views

Browser Cache Control

First: I'm a Designer that knows some HTML and CSS, not a programmer, so I'm so in advance for my limited knowledge and understanding :) My website skeleton is based on a single HTML and a few CSS &...
1
vote
1answer
63 views

How do I adjust my HTTP caching for optimum page delivery performance?

I read an article about caching at http://vadmyst.blogspot.ca/2005/09/server-side-etag-vs-cache-control-max.html and currently I'm using both cache-control, expires, and Etag type validation on my ...
1
vote
1answer
49 views

Uploading New Version Of Media Files Are Still Cached In Browser

Sorry if this is the wrong venue. I upload new media files to web site (MP3 or OGG). Visitors clear their cache and refresh their browser. However, the -old- version of the file still plays for them. ...
3
votes
1answer
9k views

How to manage the leverage browser caching for third party JS files? [duplicate]

Is it possible to set and expiration date for the file http://assets.pinterest.com/js/pinit_main.js? And the other stuff down the list? I want to bring up my score as high as possible. I'm using ...
1
vote
1answer
2k views

How do I make a static html page and its resources cacheable?

I just ran a pagespeed analysis of my page and came across the following pointer by google pagespeed: Leverage browser caching Setting an expiry date or a maximum age in the HTTP headers for ...
2
votes
3answers
6k views

When do browsers clear cache and how can I make more use of 304 responses?

I have a website with some some content which changes frequently. I would like to benefit from good caching when this doesn't change (so would ideally use a longer Cache-Control header), but would ...
8
votes
2answers
7k views

Google Pagespeed tells me to leverage browser caching when caching is already enabled

Google Pagespeed Insights still tells me that I have to enable browser caching, but I don't understand what I'm missing. I'm using cloudflare with optimizations enabled. I see this HTTP header in ...
2
votes
2answers
84 views

Caching a changing site

I run a website where the static content changes at least 4 times a week and I'm trying to figure out the best header arrangement to use. Currently I have all caching related headers in use. I have ...
4
votes
3answers
2k views

What effect does turning off caching in all browsers have on SEO?

What effect does turning off caching in all browsers have on SEO?
4
votes
1answer
6k views

How to set browser cache to expire after one day?

I'm using the code below in my .htaccess file to enable caching for my website: ## EXPIRES CACHING ## <IfModule mod_expires.c> ExpiresActive On ExpiresByType image/jpg "access 1 year" ...
1
vote
2answers
3k views

How do I Add Expires headers for CSS file with ?ver=4.1

I'm optimizing my website with Gtmetrix and in Add Expires headers section it shows the below error- There are 49 static components without a far-future expiration date. css/front.css?ver=4.1 ...
2
votes
0answers
702 views

ExpiresByType not working for PNG images when set in .htaccess for a WordPress site

In my website I have the expires headers settings reported below. When I use Google's PageSpeed Insights test I get the message: XYZ.png expire headers not set, which I'm getting for all the PNG files ...
2
votes
1answer
3k views

Cache control header specified in .htaccess is not working for static files

I'm trying to use Google PageSpeed Insights to speed up my website - www.edmhunters.com. First off, here is what my .htaccess file looks like # -------------------------------------------------------...
1
vote
1answer
5k views

Caching of JS and CSS files – Apache mod_headers doesn’t take effect

As suggested by an answer on SO, I'm trying using a version number on my JS and CSS files so that the browser will only make a request when the JS or CSS version number is changed in my PHP file. To ...
1
vote
0answers
159 views

Set cache control from WAMP such that Firefox reports cached pages in the primed cache report

So I tried to allow cache by using <meta http-equiv="Cache-control" content="public, max-age=31536000"> but I'm not sure if the content of my pages are actually being cached. Although I ...
3
votes
2answers
1k views

What's the minimum age for a Cache-Control header with Akamai?

We're planning an integration with a CDN (likely Akamai) and are trying to determine how low we could go for a max-age value. For a site that could get a few hundred thousand folks hitting the site ...
2
votes
1answer
3k views

Can I set Cache-Control in the .htaccess file for a specific part of a document (just a section of the <body>)

I noticed, by using Google Page Speed Insights, that if I structure my HTML to load the critical, above-the-fold content first, my page will improve performance - and it woks (with now current perf. ...
10
votes
2answers
738 views

Why is “29030400” seconds used as a common value for cache expiration?

I noticed that 29030400 is used very often in the Expires directives for static files. Google recommends to cache this kind of files up to 1 year (1 month at least). I did the math: 29030400 seconds ...
26
votes
1answer
18k views

Why is this response being cached?

I have a client whose site's index.html currently comes back with these headers: Accept-Ranges: bytes Connection: Keep-Alive Content-Encoding: gzip Content-Length: 3658 Content-Type: ...
2
votes
1answer
147 views

Ideal cache times for browser caching times for different file types?

I am trying to improve my site's performance - and that includes caching. I found some great caching via .htaccess from the boilerplate html5 template - but the cache times seem odd. Does anyone ...
1
vote
2answers
135 views

How to compel the browser to get the webpages from a server not from a local cache even if a particular page is frequently requested?

I have been testing a web site but every time I complain to the web developer that I am not able to see on the website which you have recently corrected,he told me that I am seeing that content from ...
1
vote
0answers
71 views

Expiry date in response header contradicts the cache-control setting

I have set up a very long expiry on some files in my .htaccess (this is OK as I change the actual filename whenever its content changes). <FilesMatch "min_\d+-\d+-\d+-\d+-\d+-\d+\.css$|min_\d+-\d+-...
2
votes
1answer
279 views

Etags are not appearing on PHP pages

My hosting provider (goDaddy) seems to be adding eTags to my files. However I've noticed that they are not appearing on .PHP file (they are on .HTM, .CSS, .JS and images). Is this normal? From my ...
2
votes
4answers
2k views

How to make CloudFlare Cache all pages

CloudFlare seems to only cache my homepage, and I am wondering if there is a way to force it to cache all pages. Notice it when BlueHost went down today and only my homepage is cached by CloudFlare. ...
3
votes
2answers
4k views

What is the default behavior of Cache-Control

If no private nor public were defined in the cache-control, e.g. Cache-Control: max-age=31461276 What is the expected behavior?
0
votes
1answer
187 views

How to ensure apache2 reads htaccess for custom expiry?

I have a site with Apache 2.2.22 . I have enabled the mod-expires and mod-headers modules seemingly correctly: $ apachectl -t -D DUMP_MODULES … expires_module (shared) headers_module (shared) … ...
1
vote
1answer
2k views

What response headers encourage 304-Not Modified upon reloads?

When looking at the network waterfall in Firebug/Chrome/IE9, I keep seeing "200-OK" instead of "304-Not Modified" for many cache-able files (images, js, css) on this page, for example. I believe it ...