2

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?

james.garriss
  • 12,959
  • 7
  • 83
  • 96
DD.
  • 21,498
  • 52
  • 157
  • 246

1 Answers1

3

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:

Community
  • 1
  • 1
BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555