Reputation: 163
I'm writing an internet access tool for a LAN that uses Linux + iptables to redirect to a login page everytime a user tries to access to any web page. That login page asks for user and password and if the authentication was successful, it removes the iptables rule so the subsequent requests goes to the originally intended webpage.
This is the situation:
How can I tell the browser to remove the "remembered" rule of redirection?
Upvotes: 0
Views: 148
Reputation: 47
Based on the http://www.w3schools.com/tags/att_meta_http_equiv.asp
If you use these meta tags page wont be cached neither by a browser nor a proxy server:
<meta http-equiv=”expires” content="Wed, 22 Jul 1981 16:00:00 GMT" />
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="cache-control" content="max-age=0" />
<meta http-equiv="cache-control" content="no-store" />
<meta http-equiv="cache-control" content="no-cache" />
Upvotes: 3
Reputation: 1012
You can remove that page/url from browser history using javascript that will do the thing you need. and also when user clicks back button on browser he will not get back to the previous page where he/she was log in.
Upvotes: 0
Reputation: 39704
You need to Hard Refresh cache.
Usually you can do that with CTRL+F5 or CTRL+R
or you change your rule to make the second redirection to same page but with some #
fragment identifier
eg: if user enters abc.com
and gets redirected on login if he tries to go again to abc.com
and you see that he was logged in redirect him to abc.com#1
Upvotes: 1