HTTP Header to cache .xml & .xsl files

R

Rahul Agarwal

Hi

We use few .xml and .xsl files in our web application and we found that
these files even though fairly static gets downloaded to the client's
machine everytime the page is refreshed.

What should be the http header or what attributes in http header should be
added to avoid downloading of these files everytime on user's machine.

Please help
Rahul
 
J

Joerg Jooss

Rahul said:
Hi

We use few .xml and .xsl files in our web application and we found
that these files even though fairly static gets downloaded to the
client's machine everytime the page is refreshed.

What should be the http header or what attributes in http header
should be added to avoid downloading of these files everytime on
user's machine.

That depends on how often these files change and if it's desirable to allow
public caches (as opposed to private caches) to store the data.

Cache-Control: public, max-age=86400

would allow any cache to store them and consider cached copies fresh for 24
hours.

Cheers,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,239
Members
46,827
Latest member
DMUK_Beginner

Latest Threads

Top