DD.
DD.

Reputation: 21981

Pragma no cache and javascript

Does the pragma no-cache mean the browser will not cache javascript scripts?

e.g. Will the pragma no cache tag stop the browser from caching the jquery script?

Upvotes: 2

Views: 12890

Answers (1)

BalusC
BalusC

Reputation: 1108722

Actually, that depends on the browser used. For modern browsers you need to add Cache-Control and Expires headers as well.

response.setHeader("Cache-Control", "no-cache,no-store,must-revalidate");
response.setHeader("Pragma", "no-cache");
response.setDateHeader("Expires", 0);

See also:

Upvotes: 3

Related Questions