NYCPHP Meetup

NYPHP.org

[nycphp-talk] using $_SERVER['HTTP_REFERER']

Aaron Fischer agfische at email.smith.edu
Fri Mar 5 16:14:22 EST 2004


I am working on a page right now that uses HTTP_REFERER to make sure 
that the user is coming from a specific page.  It seems to be working 
pretty well except for one little hiccup involving the back button:

Scenario:
The user clicks from the referrer page to my page and is let in OK.  
When they are done they leave and go somewhere else.  However, if they 
choose to hit the back button they are let into my page again.  I would 
like to know how I can prevent this from happening?

I tried playing around with meta tags like content no-cache and things 
of that sort to prevent the browser from storing in memory but it has 
not had the desired effect.

So I'd be interested in some tips/pointers on how to prevent the back 
button being able to be used to get back into my page and also 
suggestions if there is a better way than http_referer to accomplish my 
goals of restricting access.

Thanks,

-Aaron




More information about the talk mailing list