XSLT and client cache

J

john

Hi
I want to do something like this:
Store the XSLT document in the client cache if it is not already present.
If present then use that XSLT document to display the xml.
I have no idea how to do this.
Can anyone help.
 
P

Peter Hansen

john said:
I want to do something like this:
Store the XSLT document in the client cache if it is not already present.
If present then use that XSLT document to display the xml.
I have no idea how to do this.

The question is somewhat vague, but I'll refrain from directing
you to read a certain essay by ESR for now. ;-)

Can we assume by "client" you mean a web browser? If so,
why would you treat the XSLT document any differently from
any other file your server sends it? Any browser with the
capability should already be caching XSLT just as it caches
anything else that doesn't ask not to be cached with the
various HTTP headers that can do so...

-Peter
 
J

john

Peter Hansen said:
The question is somewhat vague, but I'll refrain from directing
you to read a certain essay by ESR for now. ;-)

Can we assume by "client" you mean a web browser? If so,
why would you treat the XSLT document any differently from
any other file your server sends it? Any browser with the
capability should already be caching XSLT just as it caches
anything else that doesn't ask not to be cached with the
various HTTP headers that can do so...

-Peter
Ya i mean web browser by client.
But how can I determine whether the XSLT document is already present
in client cache??
 
P

Peter Hansen

john said:
But how can I determine whether the XSLT document is already present
in client cache??

You cannot. Have you read about how caches function? The
best you can hope to do is to ask the client to reload
the document, either by marking it as non-cachable or by
indicating that it has changed since the last time the
browser tried to load it, using the last-changed header.

And even then, the browser is free not to reload it again
if it doesn't want. Heck, a user can configure the browser
not even to *check* whether the file should be reloaded,
in some cases.

What are you trying to do that you think you need to
know whether a client cache contains a document?

-Peter
 

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,756
Messages
2,569,534
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top