0

I am looking for strategies to prevent user web browsers from caching my Wakanda pages and scripts. I am finding lately as I fix problems, I have to ask users to clear their cache which is really something I'd like to save them from having to do. Do you have any suggestions how I can prevent their browsers from caching my pages? Thank you.

NAMS
  • 953
  • 6
  • 17
  • take a look to http://stackoverflow.com/questions/1341089/using-meta-tags-to-turn-off-caching-in-all-browsers – gaetanoM Sep 02 '16 at 18:18
  • Possible duplicate of [Making sure a web page is not cached, across all browsers](http://stackoverflow.com/questions/49547/making-sure-a-web-page-is-not-cached-across-all-browsers) – Trasiva Sep 02 '16 at 18:22
  • @Trasiva thank you- I got a solution from your link. – NAMS Sep 12 '16 at 14:19

2 Answers2

1

We've encountered a few caching issues so far and have found that disabling the Wakanda Cache can sometimes help in these scenarios.

Under your Common App settings, uncheck 'Use Page Cache'. Of course, this is the Wakanda Server side cache, so if there's a local caching issue happening, this won't help you. However this often helps even with client-side cache problems.

As @gaetanoM suggested, you can also force the Cache-Control headers to force the client side to not cache in the browser. Using jquery is easy enough with:

this.http_request.setRequestHeader("Cache-Control", "no-cache");

If you need to see an example of how Wakanda sets this out-of-the-box, take a look at the angular-wakanda-debug.js file or Rest.js file in the lib directory as the default debugging mode disables the cache itself.

Aaron Lavers
  • 838
  • 8
  • 27
  • 1
    Hey, thank you for your input. I checked the page caching and it was turned off already. I did look into a link @Trasiva posted in my original post and found that adding these three tags works for Firefox, Chrome, and Safari. ` ` – NAMS Sep 12 '16 at 14:17
0

@Trasiva posted a link to a very useful page. It was not Wakanda specific, but it worked fine for me and has links for many different programming environments. The below tags in every HTML page work for me in Chrome, Safari, and Firefox.

<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate"/> <meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT"/> <meta http-equiv="pragma" content="no-cache"/>

@Trasiva's original link: How to control web page caching, across all browsers?

Thank you all.

Community
  • 1
  • 1
NAMS
  • 953
  • 6
  • 17