Developer forum

Forum » Feature requests » Cache-control headers

Cache-control headers

Sten Hougaard
Reply

Hi,

I am doing optimizing on a Dynamicweb website using Yahoo YSlow. One of the things the site fails on is the "Add an Expires or a Cache-Control Header".

I know that the GetImage have been improved lately, so perhaps now we could do the same for fetched files?

I made a quick table showing differences in cache related headers on GetImage and an example javascript file:

Header GetImage javascript fil
Cache-Control public, max-age=86400
Last-Modified
ETag
Date

 

I guess that if the headers were in both GetImage and file output my site would not fail on YSlow and thereby be more optimized for caching, which again means better performance.


Med venlig hilsen/Best regards,

Sten Hougaard
Webudvikler
@: netsi1964

 - I am available for hire

 


Replies

 
Nicolai Høeg Pedersen
Reply
This post has been marked as an answer

Hi Sten

File headers are managed by the hoster (IIS), so we cannot change it in Dynamicweb it self. You can make some changes in web.config - try searching the forums - Morten Bengtson made a good guide on this.

Problem with a general expires following YSlows "Never expire" policy is, that the developer needs to be aware of this to avoid caching of olde js and css files.

So in other words, handling the headers for your static files will be your own responsibility for now - using web.config.

Votes for this answer: 1
 
Sten Hougaard
Reply

Thanks Nicolai,

The post by Morten Bengtson can be found here..

/Sten