Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Refresh page when clicked on link [duplicate]

I have the following to refresh my page when clicked on href.

    <a href="javascript:history.go(0)">Click to refresh the page</a>

I have this

    <meta http-equiv="no-cache"> 

in the head tag. Even then I am getting a cached copy. How can I avoid loading cached copy?

like image 477
Benny Avatar asked Dec 26 '13 10:12

Benny


3 Answers

instead of

javascript:history.go(0);

you may use

javascript:window.location.reload();
like image 74
Green Wizard Avatar answered Sep 21 '22 07:09

Green Wizard


Try this

window.location.href=window.location.href
like image 28
Rakesh Kumar Avatar answered Sep 24 '22 07:09

Rakesh Kumar


<a onclick="window.location.href=this">test</a>
like image 34
NiksD Avatar answered Sep 24 '22 07:09

NiksD