Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Get URL for previous page 1

Status
Not open for further replies.

rexolio2008

Technical User
Apr 24, 2008
41
US
I know that I can get the referrer for a particular page - meaning I can retrieve the URL from which a user clicked a link to my site.

BUT, how can I retrieve the user's previous URL, even if they don't click a link but instead type my web address into the browser address bar.

What I'm wanting to do is to be able to add a link to my browser's LINKS menu where, if I'm reading a news story somewhere, I can just click that link which will take me to my site where I can quickly post something about what I just read and include the link automatically. (I know WordPress does this with it's PressIt function, but this isn't for WordPress).

Thanks in advance, and sorry if it's a stupid question.
 
Take a look at how Press It works:


It's a simple bookmarklet which passes through the current URL. There's no reason you cannot do the same, as long as you modify all of your pages to accept the given params (or whichever params you happen to need).

Hope this helps,
Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

Dan's Page [blue]@[/blue] Code Couch:
Code Couch Tech Snippets & Info:
 
Wow... I think that will work. I feel completely stupid for not thinking about actually looking at how Wordpress does it. Duhrrr.

I'll try it out. Pass or fail, I'll post back and let everyone know.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top