Dave
Dave

Reputation: 1492

Chrome and Firefox does refresh all js file except one

I'm running an application on jBoss.

In one page there are many js files. Chrome and Firefox see the changes on all js file when I reload the page, except one.

I open Chrome (firefox) in unknown mode, disabled the cache of Chrome console (Firefox console), reload the page, clean and restart the application server and rebuild the application.

Nothing.

I don't know what to do.

Upvotes: 0

Views: 64

Answers (2)

André Ferrari
André Ferrari

Reputation: 179

When linking the scripts on you pages you can put something after the file like

<script language="JavaScript" src="<file_name.js>?yyyymmdd"></script>. 

This "yyyymmdd" can be the current Date/datetime (never caches) or the last modification date of the js file you are including (it cancel the cache only when you modify the script).

That is the approach we use.

Upvotes: 1

A DEv
A DEv

Reputation: 340

In chrome, go to developer tools(press F12), go to Network panel, there check 'Disable cache' option and load your page..

Upvotes: 0

Related Questions