views:

123

answers:

1

Hi,

A website of mine will host the usual images, javascript and CSS stylesheets in the database. Since these are unlikely to change each day, I am going to use some client caching on these to reduce the server load.

How long do you cache these? A few days? More?

I'm probably not going to reuse the same name twice if I update the resource, so I shouldn't have outdated data concerns.

+1  A: 

If you're changing the name when you update, then you have the luxury of caching forever. This is a big plus if you're okay with name changing.

It's also a good idea when it comes to script and CSS as some client machines will persist to cache even if you had ruled otherwise.

dove
Is forever such a good practice? I mean that if everyone does the same thing it is a waste of client resources for not much benefit
Luk
they can always clear their cache, it's up to them
dove