-1

I am facing a problem with a backend using cookies .

The UI technology is JSP and i have login to the application and performed some operations.

At that time i copied the url and opened a new tab and pasted the copied url

In this case i would like the user to be redirected to login page.

Arun
  • 584
  • 1
  • 6
  • 19

1 Answers1

0

This is what i understood from your question :

Your webserver uses cookie to store user session info , you want the user to be redirected to login page when he copy pastes the link onto a new tab .

This is what happens when you do what u said u did :

When a user requests a url from a new tab with an established session in the previous tab , the cookie is sent along with this newtab request hence the webserver renders the page to this request since it is legitimate.

However , the same will not work if you fire the request using a different browser.[In this case the backend will redirect the user to login page (if you've identified the url is without cookie info and programmed a redirect to login page in your server code).]

I don't think this can be done using cookie based session handling .

Please do check this link How to differ sessions in browser-tabs?

Community
  • 1
  • 1
Arun
  • 584
  • 1
  • 6
  • 19