-1

I'm doing changes in JavaScript file every time. I need to clear the browser history to reflects the changes in JavaScript file is there any solution for this problem.

2
  • Take a look at this link Commented Dec 9, 2015 at 14:14
  • Pressing CTRL + F5 in most browsers forces it to perform a cache refresh of the current page, including resources that the page loads such as JS files. Handy during development. Commented Dec 9, 2015 at 14:16

1 Answer 1

1

Try this.Just append some random value

<script type='text/javascript' src='main.js?version=RANDOM VALUE'></script>
Sign up to request clarification or add additional context in comments.

7 Comments

where i need to append that script tag
In the head section of your html page
for each and every page i need to add this script tag
If you want to refresh js file then yes.
thanks for your response Santosh
|

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.