A consult please, I have done a login page which open the application page and from this page I can go to other pages, I started a session, when I clear the session and back to login page stayed in the history the last page opened from application page, clicking in the arrow forward I can go to such page, it is wrong!, how could I delete such last page?, my goal, when I finish the session is to delete the history of the last page opened from the application page.
I thank you in advance for your help.
I am beginner programming Html, I dont have ideas to resolve this problem.
IF you simply want to protect a page:
Depending on your session validation, do this on your "protected" sites:
On logout.php
See this answer to handle Caching.
IF you need to really clear the BROWSER HISTORY:
There are is no "good" way, although, there are some options:
Option 1: Navigate with
window.location.replace(url)If you click that link, it will replace the current session entry in the browser history. You cannot go "back" anymore from Google to the origin of this link. Instead, you would be brought back to the page before.
Option 2: use the chrome history api:
Specifically, it should be enough to call:
browser.history.deleteAll();But this is not supported on all browsers, see their supported section.