Change back button to go back

I have this web application that complies with the following standards for all websites.

  • Users browse any page on a website.
  • They click the link to enter the title from any page.
  • Visit the login page, and then log in and go to their login page.
  • Then the IF user accesses the back button and they are redirected to the home page (since they are already logged in).

How do I change at javascript or php level for the following

  • Users browse any page on a website.
  • They click the link to enter the title from any page.
  • Visit the login page, and then log in and go to their login page.
  • IF the user then clicks on the "Back" button, they will be taken to the page they visited before viewing the login page.

thank

+3
4

, : 1. script, , - , . php ,

header("Location: http://www.google.com");

2. AJAX, > loginpage- > profilepage , .

, , , , , "" - " , Bob, Profile , ..", , .

, :)

+3

"".

, ( ), .

0

, php , "".

0

script, :

A) Checks if the user is logged in or not (possibly using sessions)

if they are logged in to redirect to the main page, if they are not logged in, download the login page

0
source

Source: https://habr.com/ru/post/1731835/


All Articles