In my user controls, I am inheriting from IScriptControl and then referencing a .js file. Currently when I do an update in the .js file, I ask users to clear their browser cache. Is there a way to solve this issue. How can the browser know that a new version has to be downlaoded from the server?
In my user controls, I am inheriting from IScriptControl and then referencing a .js
Share
You should store the JS file inside a DLL as a WebResource and reference to it in ScriptDescriptor.
This way ScriptManager generated javascript reference that contains DLL hash in it’s URL,
thus when you modify your code and recompile – the DLL’s hash is changed, forcing the browser to reload JS file (since the framework generates different URL which is based on the DLL’s hash).