2

Hi we've been working with Adobe DPS for a while now and we just started using html to support some more advanced interactions. So we inserted the html & assets locally into a webview.

When updating these files the webview doesn't update. It looks like the webview is caching everything(html/css/js/images) extremely hard.

Is there any way to prevent these webviews from caching just for development purposes?

Raptor
  • 53,206
  • 45
  • 230
  • 366
Stijn_d
  • 1,078
  • 9
  • 20

2 Answers2

0

you can use location.reload(true) in your javascript to trigger a hard refresh. the first argument specifies that the reload should be a "hard refresh"

Obviously you can't call it on page load or you'll end up with an infinite loop of reloads, but you could add a development-only button in the page along the lines of:

<button onclick="location.reload(true);">hard refresh</button>
Jiaaro
  • 74,485
  • 42
  • 169
  • 190
0

You could also try adding the following Meta tags in your HTML

<meta http-equiv="Cache-control" content="no-cache">
Ivan
  • 1