Struggling with javascript changes refreshing - clock example

Hi there,

I’m trying to learn about plugin development but am struggling to get any javascript changes to stick in my development set up.

I have installed grafana as the standard server on Mac OS.
I have followed the clock example from scratch (not cloning it)
All the builds seem to work using Grunt.
When I change src/module.html, run grunt and refresh chrome the HTML changes and the screen presents with the change. (I can see the changed HTML in dist folder)
When I change src/clock_ctrl.js, run grunt and refresh chrome – nothing changes —. (I can see that the clock_ctrl.js file has update in the dist folder with my changes) however when i look for the change in Chrome nothing changes.

i have been so blatant as to change

this.time = now.format(this.getTimeFormat()) to this.time = ‘Nigel’. but the chrome output remains displaying time???!!

Can anyone explain why this might be. the module.html seems to change the clock_ctrl.js doesn’t??

You have any other browser on your system? Or just try in a incognito window of Chrome. If your changes are there then, it’s obviously a brower’s cache issue.

Thanks Bitone. You’re right it was a caching issue. Just turned off
caching in developer tools>network and things started working as expected.
Incognito a good idea too. Issue solved. Thanks.

1 Like