• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Javascript-- how to find referrer when url redirect is done

 
Vishal Sinha
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have 3 jsp pages...
Page1 is part of application1.
Page1 contains a anchor element which points to page2. Page2 redirects to page3 which is a part of different application, lets say application 2.
(page2 does response.sendRedirect(page3) to redirect to the application2).

My question is how can I find out url of page 2 on page 3 using javascript. Please note that document.referrer in javascript gives url of page1. Also I want to run javascript code only on page3

Any help regarding it will be appreciated.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64721
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You cannot do this reliably.

Why do you need to know where you came from? Perhaps a better way can be suggested.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic