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 Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Detect recent previous visit on back button? 3

Status
Not open for further replies.

oldnewbie

Technical User
Dec 6, 2000
9,142
CA
John or Jean or whoever for that matter, visits my site... Goes on to others. At some point, with the back button, or by link, or by his bookmarks, he or she or whoever comes back to my site.
Is there any simple way in javascript, without the use of cookies, or side server scripts, to detect that this user visited my site within the last... let's say 15 minutes, for the sake of the argument?
Could it be done by time stamping the user's IP, for example and somehow storing that info for a while in case he returns?
If all possible, in any other simple way, can someone post an example script?

Thanks,
mywink.gif
ldnewbie
 
In a word, No!

The whole concept of the web is each page is stateless; i.e. it doesn't know that you've been to a page when you return to it.

This has many advantages, but also many disadvantages. The solution to your problem is...I'm afraid...

Cookies.

Hugh Prior
 
JavaSprout,

Thanks for your reply.
In that perspective, would something described in this thread216-54238 work?
If so and you understand it (I don't!), could you give me a little more details on how I could implement something like that!
Like if I wanted to set the cookie to expire in half an hour rather than in a week!

Thanks again!
mywink.gif
ldnewbie
 
hey oldnewbie, i havent messed much with cookies, but i just have been reading ur post & suddenly got an idea: what if scanning user's history? & if at least one of urls in history array matches with ur needed (current) url that wuld mean that this user was here (if (s)he didnt launched new browser instance or if he was here not just once or smth)
it is not ideal, but it is better then nothing..
regards, vic
 
Vituz,
Thanks for the idea, but once again you're the expert here! I'm just starting to understand java functions... Certainly not able to write one as complex(at least for me!) as that!
And this answer from Tsdragon seems to go against this:
thread216-105973


mywink.gif
ldnewbie
 
wooo - looks like tsdragon knows EVERYTHING about security stuff.. may be it is not my area..
what can i say, it might be true, & i bet it is, but i'll check it myself (Tracy wrote that he doesn think that it is avaiable :)) regards, vic
 
woops, looks like i ***cked up..
u shurelly cant knowout history's value.. :~/

u're gonna do it thru cookies regards, vic
 
Vituz,
Could be interesting if you found something out!

I was trying to help another user on the Flash Forum, who's trying to avoid for his visitors, to have to go through an intro part of his movie, if those visitors had recently seen it!
Among many others, found this (INTRO ONCE) that seems simple enough and, I suppose would work fine if the user has cookies enabled!


As for java cookies in general, if you're or anybody else is ever interested, you could have a look at this:


Thanks for your help! You get my vote!
mywink.gif
ldnewbie
 
oldnewbie, thunx for good tips on cookies for us here! regards, vic
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top