flynny
asked on
Leverage Cache-Controll IIS 7.5
Hi all,
I'm running page speed to test for SEO performance on a site.
We are running IIS 7.5.
Now it's recommending we leveage browser cache-control. We have the following in the web.config
now when i view the headers in firefox. cache control is marked as private. This is why I assume it failing the page speed test. Will the fact its makred as private (even though I asusme the cache control is still being completed) affect the SEO?
I'm running page speed to test for SEO performance on a site.
We are running IIS 7.5.
Now it's recommending we leveage browser cache-control. We have the following in the web.config
<location path="content/images">
<system.webServer>
<staticContent>
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="10.00:00:00" />
</staticContent>
</system.webServer>
</location>
<location path="content/css">
<system.webServer>
<staticContent>
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="10.00:00:00" />
</staticContent>
</system.webServer>
</location>
<location path="scripts">
<system.webServer>
<staticContent>
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="10.00:00:00" />
</staticContent>
</system.webServer>
</location>
now when i view the headers in firefox. cache control is marked as private. This is why I assume it failing the page speed test. Will the fact its makred as private (even though I asusme the cache control is still being completed) affect the SEO?
ASKER
Hi Dan,
Many thanks for the reply.
Ok, so caching is working then if its showing private which is fine. I misunderstoo the meaning of this.
Do you have any ideas why thepagespeed is recommending I need to leverage the browser caching?
Is it looking for a appcache manifest or something?
Many thanks for the reply.
Ok, so caching is working then if its showing private which is fine. I misunderstoo the meaning of this.
Do you have any ideas why thepagespeed is recommending I need to leverage the browser caching?
Is it looking for a appcache manifest or something?
ASKER
Hi Dan,
Just to add I have added the custom attribute to each to set it to public. Now when I view the header info through the browser (firefox) i have max-age=0 ??
An ideas?
Just to add I have added the custom attribute to each to set it to public. Now when I view the header info through the browser (firefox) i have max-age=0 ??
An ideas?
Can you post the client cache object lines from your config?
Dan
Dan
ASKER
Hi Dan,
Of Course, I have the following in my web.config now
Of Course, I have the following in my web.config now
<location path="content/images">
<system.webServer>
<staticContent>
<clientCache cacheControlCustom="public" cacheControlMode="UseMaxAge" cacheControlMaxAge="10.00:00:00" />
</staticContent>
</system.webServer>
</location>
<location path="content/css">
<system.webServer>
<staticContent>
<clientCache cacheControlCustom="public" cacheControlMode="UseMaxAge" cacheControlMaxAge="10.00:00:00" />
</staticContent>
</system.webServer>
</location>
<location path="scripts">
<system.webServer>
<staticContent>
<clientCache cacheControlCustom="public" cacheControlMode="UseMaxAge" cacheControlMaxAge="10.00:00:00" />
</staticContent>
</system.webServer>
</location>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
link: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.1
The main difference between public and private is that it indicates whether an object can be stored in a shared cache (public) or is to only be stored for a single user (private)
You can directly control the cache directives using:
1. public
2. private
3. no-cache
Here is the tech reference to the clientCache element:
link: http://www.iis.net/configreference/system.webserver/staticcontent/clientcache
Notice that there is a "cacheControlCustom" attribute available. Here you can explicitly set the directive to be used. For example:
can be
Open in new window
Dan