1

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?

1 Answer 1

2

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).

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.