View Full Version : How to prevent a user from bookmarking?
jscript_newbie
10-16-2002, 12:03 PM
Hi...
I've a secure site.. and was just wondering how i can prevent a user from bookmarking/adding to favorites the secure page?
Thanks.
Cheers
requestcode
10-16-2002, 01:22 PM
As far as I know there is no way to keep them from doing that.
Simrey
10-16-2002, 01:44 PM
Hmmm -- you would have to have some way of disabling the Add to Favourites button, and I'm sure JavaScript offers no way of doing that -- for the same good reason that it won't let you write to files: the security and privileges of the user. But even if it did, the url would presumably still be visible and the cunning user could still copy and paste it into the bookmarks file or into a page of links...
However, I have noticed that some pages generated by a form submission "expire" and are not available through the Back button nor presumably from a Favourites list. In other words, although you can't stop people bookmarking pages, you can fix it so the page ceases to exist once they've unloaded it. Such a page I imagine would have to be one generated by another page rather than one that exists as a file in its own right.
Simon
joh6nn
10-16-2002, 09:49 PM
most pages that expire like that, use session cookies. the cookie only lasts for as long as you have the browser open, and when you close it, the cookie dies. you could easily do that. just write a function that creates a cookie on the page BEFORE the one you want to be secure, and on the page that is secure, you have a function that checks for the cookie, and only loads the page if it's there. if it's not there, redirect to the homepage or something.
glenngv
10-17-2002, 02:15 AM
Originally posted by jscript_newbie
Hi...
I've a secure site.. and was just wondering how i can prevent a user from bookmarking/adding to favorites the secure page?
Thanks.
Cheers
you should solve the root of the problem not the cause.
since you said it is a secure site, i assume you have a login page.
so upon entering this page you dont want bookmarked, you should check if the user has logged in or not.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.