Response header: Pragma: No-cache - caching

So I've been fiddling around with this for quite a bit now and don't seem to be anywhere near the answer to my problem.
For some reason IE does not cache the static content of my website (img/js) yet Chrome does.
Looking at the headers I found the both the pragma tag, as well as the Cache-control have a no-cache set but I do not know where this thing comes from. No-where in the application the no-cache is ever set.
I am using IIS 7.5 and Oracle WebGate as authenticator.
On our IIS itself, I have set the settings to cache the content and live for 36 hours.
Also in the web.config the following tag is present in the image folder:
<configuration>
<system.webServer>
<staticContent>
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="30.00:00:00" />
</staticContent>
</system.webServer>
Furthermore, I also have a tag in my web.config of my front-end
<caching>
<cache disableExpiration="false" />
</caching>
I read on some forums that removing this would help but alas, it doesn't.
I also looked for add extension because that also seemed to be causing issues according to someone else but I never set something like that.
Has anybody got any idea what this could be causing?

By default Oracle Web Gate uses by default cache control no-cache and pragma no-cache.
see the doc here : http://docs.oracle.com/cd/E22203_01/doc.31/e20664/chapter_12.htm
at the bottom of the page

Related

enabling caching of js/css files with nodejs/iis7 reverse proxy

I have a nodejs backend, site served through iis7 via reverse proxy as per this website: https://alex.domenici.net/archive/deploying-a-node-js-application-on-windows-iis-using-a-reverse-proxy. In the node app i have a middleware layer to all get requests to cache content, like so
res.set('Cache-control', public, max-age=${period})
When running on my local machine i'm checking the headers via google developer tools and it does look like caching is working properly. When I move it to production, i can't seem get it to work. On IIS i've configured the HTTP Response Headers to expire after 10 days. My web.config looks like so (again per the link above)
<httpProtocol>
<customHeaders>
<add name="Access-Control-Allow-Origin" value="*" />
</customHeaders>
</httpProtocol>
<staticContent>
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="10.00:00:00"/>
</staticContent>
</system.webServer> </configuration>
Tried various things without success. The only possible lead i have at this point is from this thread
https://social.msdn.microsoft.com/Forums/vstudio/en-US/981bf691-ed6e-460a-9e99-af24fc8bfc0e/nodejsweb-apps-output-cache-not-working-for-node-web-app?forum=opensourcedevwithazure
but i have no idea how to make the suggested change in the web.config file. A couple of notes, im currently just running my node app in the command prompt like so: node app.js, not as node bin/www as suggested in the link (having some odd issues). Also, the site is still very much in development so on ssl. Read that chrome might have some issues with it, but the problem is present in all browser tested (chrome, firefox, etc...)

"Leverage browser caching" not working in IIS or Page Speed reporting wrong

I have tried set this in web.config:
<staticContent>
<clientCache cacheControlCustom="public" cacheControlMode="UseMaxAge" cacheControlMaxAge="1.00:00:00" />
</staticContent>
I also modified the value through the GUI but my Response Headers still says no-cache:
I read several posts and this one looked promising but still I can't get it to work.
From what I understand from this image the image bbb.png is taken from the cache but Page Speed (after refresh, and after waiting a couple of minutes) that it still is not being cashed:
Why isn't this working?
According to https://varvy.com/pagespeed/ I'm not caching 3rd party images:

Updating clientCache in web config not changing expires header

I have a site running on iis7.5 where, through Firebug, I can see that my static content (css, js and images) have an expiration in their header consistently set to one day in the future. I find no where this is set, but I just came on recently to the project.
I want to make the expiration further in the future, so added a section in the web.config:
<system.webServer>
<staticContent>
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="100.00:00:00" />
</staticContent>
</system.webServer>
After restarting the site, this had no affect on the expiration date of these items.
My question is, what can override the clientCache setting, imposing a different expiration date?
Thanks,
Matt

How to set cache expiry date

Trying to cache a large js file on the client browser. When I check firefox's cache information, it shows the js to expire on 12/31/1969. I'm using IIS6 and have tried adding the following code to the web.config:
<staticContent>
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="30.00:00:00" />
</staticContent>
Still the same. How can I get the browser to cache this file?
In IIS, right click on your Site node and click Properties. Go to the HTTP Headers tab, tick Enable content expiration and set an expiry time.
You may have to configure that in IIS, I'm not sure that IIS6 honors that web.config setting like IIS7 does.

what is causing IE8 to render in IE7 mode by default

this site : http://medisra.sideradesign.com
it is rendering in IE7 document mode by default.
Is this due to a CSS or HTML validation error? how can I identify what's causing it?
thanks
Here's all the places I can think of where the header could be coming from.
Considering your comment:
I have other subdomains on the same
server and the sites render in
standards mode.
It's unlikely to be defined in Apache's httpd.conf or similar.
Have you made 100% sure there are no other .htaccess files or other configuration files which could be introducing it?
Is your PHP code outputting the header? It would look like this in PHP:
header('X-UA-Compatible: IE=EmulateIE7');
Could it perhaps be the fault of a Wordpress plugin?
You could use a utility to search in every single file of the website for the string "EmulateIE7".
If you still can't find it after following through those ideas, I'm afraid I can't think of anything else.
This is a good reference about defining document compatibility mode.
This will render all pages on the site in IE7
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<httpProtocol>
<customHeaders>
<clear />
<add name="X-UA-Compatible" value="IE=EmulateIE7" />
</customHeaders>
</httpProtocol>
</system.webServer>
</configuration>
Check in the source of that page if the head contains the following meta tag:
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
If it does, that's why it renders the page like IE7 by default.

Resources