Click to See Complete Forum and Search --> : Window already open?
Hyabusa
12-03-2003, 08:23 AM
Hey,
I am trying to some how make sure people don't have more than 1 window open for my site (to save bandwidth), does anyone know a way of doing this? Even if its not full proof it would still help :)
Thanks, Craig
Gollum
12-03-2003, 08:33 AM
Not entirely sure how it saves on bandwidth - but you could have your entry page (the first page people go to on your site) popup a browser window with a specific name using window.open...
window.open(url_of_main_page, "someNameThatIChoose");
This way, if the user already had a browser used for your site, it would automatically be reused.
Hyabusa
12-03-2003, 12:34 PM
Thanks for replying, the idea was that i could output a message instead of the page if the user had the site open already saying "You can only have one copy of the site open".
This would save bandwidth/load as people would realise and only load the site once, it's only for when the site is REALLY busy.
If i could somehow rename the current browser window and then do some kind of check to see if it exists.
Any ideas?
Thanks, Craig
olerag
12-03-2003, 12:45 PM
I could be wrong (maybe someone knows if this could be
done in JS) but you really can't ensure a user would not
hit your web appl more than once especially if, lets say,
you had both IE and Netscape browsers on the workstation
and each were used to call the website in question.
The only way to defeat such an occurence would be to handle
the logging from a server-side program (such as Java RMI) that kept track of the client-side access thru threads.
Again, if I'm in error about this I hope somebody corrects me.