The Cache: Technology Expert's Forum
 
*
Welcome, Guest. Please login or register. September 22, 2019, 06:05:24 PM

Login with username, password and session length


Pages: [1]
  Print  
Author Topic: find out if someone came "back" to a page  (Read 2415 times)
nutballs
Administrator
Lifer
*****
Offline Offline

Posts: 5627


Back in my day we had 9 planets


View Profile
« on: October 28, 2008, 07:07:35 PM »

So, if I do a JS redirect on someone, and they click their back button, they get stuck on my redirector.

not a big deal, but I don't really want to do this to people.
So... is there a way to know if someone has come back to the page via clicking the back button? In PHP? I doubt it of course, but figured Id ask.

I guess I could cookie them with a short duration cookie, check that upon return. Though, I don't think I get the cookie on a back button press, because they are viewing a cached page...
Though, could I do it with JS?
first hit, set JS cookie.
second hit, check JS cookie, if exists, then force them back 1 more page via JS? maybe?
I was hoping to avoid sending anything more than I have to, but gotta do what I goota do.
Logged

I could eat a bowl of Alphabet Soup and shit a better argument than that.
perkiset
Olde World Hacker
Administrator
Lifer
*****
Offline Offline

Posts: 10096



View Profile
« Reply #1 on: October 28, 2008, 09:19:49 PM »

well, the referrer would be itself, no? That might give you the symptom you're looking for...
Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
nutballs
Administrator
Lifer
*****
Offline Offline

Posts: 5627


Back in my day we had 9 planets


View Profile
« Reply #2 on: October 28, 2008, 10:19:13 PM »

meh i tossed it and changed to a flat out redirect. screw the JS.

BTW. storing the spider ips as a directory tree works wicked fast Wink
Logged

I could eat a bowl of Alphabet Soup and shit a better argument than that.
perkiset
Olde World Hacker
Administrator
Lifer
*****
Offline Offline

Posts: 10096



View Profile
« Reply #3 on: October 29, 2008, 08:10:33 AM »

Nice... glad to hear you pulled the trigger on that. What was the final layout you chose... 3 dir tree of the first 3 octets in the address or...?
Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
nutballs
Administrator
Lifer
*****
Offline Offline

Posts: 5627


Back in my day we had 9 planets


View Profile
« Reply #4 on: October 29, 2008, 08:27:49 AM »

yea basically a tree of octets. so you just replace the dots with slashes.
actually i will post my function Wink
Logged

I could eat a bowl of Alphabet Soup and shit a better argument than that.
nutballs
Administrator
Lifer
*****
Offline Offline

Posts: 5627


Back in my day we had 9 planets


View Profile
« Reply #5 on: October 29, 2008, 08:45:02 AM »

ok here it is
http://www.perkiset.org/forum/php/botbase_as_directories_function-t1205.0.html;msg9128#msg9128
Logged

I could eat a bowl of Alphabet Soup and shit a better argument than that.
Pages: [1]
  Print  
 
Jump to:  

Perkiset's Place Home   Best of The Cache   phpMyIDE: MySQL Stored Procedures, Functions & Triggers
Politics @ Perkiset's   Pinkhat's Perspective   
cache
mart
coder
programmers
ajax
php
javascript
Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks


Valid XHTML 1.0! Valid CSS!