0

How can I be sure that my user is using/seeing the latest version of my static content (js scripts, gifs, svgs, etc...) without telling them to clear their cache?

Leonardo
  • 10,737
  • 10
  • 62
  • 155

1 Answers1

1

You have two broad options.

  1. Disable caching altogether. That is a reasonable idea for dynamic content but generally poor for static content. So we will ignore this for now.
  2. Generate different URLs / querystring for when your static content changes.

There are many possible approaches for option 2, for example:

Additionally, https://github.com/mwrock/RequestReduce is an option I have used in the past that you may want to have a go with.

mjwills
  • 23,389
  • 6
  • 40
  • 63