Reputation: 809
I have code that sets the src of an ExtJS 4 Image component.
me.cpuChart.setSrc(cpuChartUrl);
I tried calling these methods after calling setSrc() but does not update:
me.cpuChart.doComponentLayout();
me.cpuChart.updateLayout();
Any ideas? Seems like first url is being cached.
Upvotes: 2
Views: 1280
Reputation: 396
It depends on the browser caching system... You could try to add a random string or query to the url to force the browser to reload the image from the server.
ex.:
cpuChartUrl = cpuChartUrl +'?dc=' + new Date().getTime();
me.cpuChart.setSrc(cpuChartUrl);
Upvotes: 2