We're a community of 1077K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,076,127 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

Get previous page URL

Hi All,
How can I get previous URL in a page. I need to clear my session/Cookies when the previous URL is not mine. In the below example assume gmail is an my own website(URL/Application)

  1. Go to www.gmail.com login and arrives at inbox page
  2. while it is still in gmail web site, in the URL type in: www.yahoo.com open the yaho page.
  3. Then type URL in: www.gmail.com and found member is still logged in. its goes to inbox, in this case need to clear my session. Any one give idea how can i get previous URL in the particular page?

Note: Need to be maintain the state when using same URL like as www.gmail.com instead of www.yahoo.com

Thanks in advanced !

Thanks,
SG

2
Contributors
1
Reply
1 Week
Discussion Span
10 Months Ago
Last Updated
2
Views
sganandhsg
Light Poster
42 posts since Sep 2008
Reputation Points: 10
Solved Threads: 1
Skill Endorsements: 0

you can check the previous url using HTTP_Referer, You can get the current domain name by using Request.ServerVariables("server_name")

atinobrian
Newbie Poster
22 posts since Sep 2005
Reputation Points: 17
Solved Threads: 4
Skill Endorsements: 0

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
 
© 2013 DaniWeb® LLC
Page rendered in 0.0518 seconds using 2.66MB