user836026
user836026

Reputation: 11340

Browser Shows cached copy of my html page

I wrote an HTML page and hosted it in tomcat servers (wit other JSP pages). I changed something in the HTML page, but still it seems tomcat still serving the old cached html. even after many days now.

how could I instruct tomcat to use the newer modified html page.

Upvotes: 1

Views: 116

Answers (2)

Mr. Alien
Mr. Alien

Reputation: 157294

You can force the browser to hard refresh your web page, simply using JavaScript here like

location.reload(true); //If false, browser will use the cached info

Upvotes: 2

Michael Tichoň
Michael Tichoň

Reputation: 291

I read somewhere to put some random string at stylesheet for example

<link rel="stylesheet" href="style.css?randomstring" type="text/css" />

So the browser will load the css again, but I do not know whether it will reload html content but you can try it. To generate random string you need PHP

Upvotes: 1

Related Questions