Mobile app version of vmapp.org
Login or Join
Ogunnowo487

: 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

@Ogunnowo487

Posted in: #Cache #CacheControl #Htaccess

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 have ideal or preferred caching times for their php/html, js, css, and image files?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Ogunnowo487

1 Comments

Sorted by latest first Latest Oldest Best

 

@Kristi941

There is no ideal length. It all depends on how often this content changes for you (and the files usually cached should not change often). I'm not in front my the code for my personal website but that content rarely changes so I have it set to be a week or two IIRC. If your content changes on a daily basis then a 24 hour expiration seems appropriate.

Basically base this decision on how often your content changes and what you feel comfortable with.

See a similar question on Stack Overflow.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme