My Solar list.json caching on Internet Explorer

When using Internet Explorer 11 to view the “My Solar” App, it never updates. I’ve pinpointed the issue to some caching mechanism that makes the list.json always return same value, i.e., http://[SOMEURL]/emoncms/feed/list.json?apikey=[SOMEAPIKEY]. I can see this in IE Developer Tools, while on other browsers such as Chrome, return values of list.json correctly show current values. If in IE Developer tools I select “Always Refresh from Server”, it starts to update properly.

Now I’m stuck with IE engine as I’ve baked in EmonCMS My Solar app into .NET WebBrowser control (=IE9) on my home automation system screen, which is Windows Forms application. While I could replace the control with Chrome control, that explodes the size of the app from 2 MB to 85 MB, and this cache refreshing issue being the only remaining issue I wouldn’t want to do that due to this seemingly trivial issue.

The question is, is there some META NOCACHE option I could configure in EmonCMS that would explicitly tell the requesting browser to not cache anything? All other alternate fixes or workarounds are gladly accepted as well.

Using EmonPi with prebuild EmonSD version “emonSD-03May16” and EmonCMS version 9.7.9. Haven’t made any changes in the code, just installed hardware and configured the My Solar app.

Steps to repro:

  1. With IE 11 (probably also older) on Windows 10 (probably also older), open EmonCMS My Solar app, i.e., URL something like http://SOMEIP/emoncms/app?readkey=[SOMEAPIKEY]#mysolarpv
  2. See that the numerical values at the top are not updating, and chart below starts to display zero values as seen in image, if comparing list.json responses, all are identical

On Chrome, responses show current values, as one would expect.

Thank you!

Oh my, apparently I solved this somehow 3 years ago, but now after having to rebuild the system, it took a while to figure out again how I fixed it: add cache: false to the two list.json $.ajax calls in /var/www/emoncms/Modules/app/Lib/feed.js.

        cache: false,
    url: path+"feed/list.json"+apikeystr,

@emrys - one for you?

1 Like

hi @jpalo,
could you test this pull request with your version of IE8 ?
I’m not able to test with that browser.

1 Like

That seems to do the trick. Issue could be reproed also on IE11.