Welcome to WebmasterWorld Guest from 50.17.16.177

Forum Moderators: brotherhood of lan & mack

Message Too Old, No Replies

prevent bookmarking

     
8:26 am on Aug 13, 2004 (gmt 0)

New User

10+ Year Member

joined:Aug 13, 2004
posts:4
votes: 0


how do i prevnt some from bookmark a page in asp or vb script?
8:39 am on Aug 13, 2004 (gmt 0)

Senior Member

WebmasterWorld Senior Member topr8 is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Apr 19, 2002
posts:3171
votes: 8


you can't stop someone bookmarking a page.
10:12 am on Aug 13, 2004 (gmt 0)

Junior Member

10+ Year Member

joined:May 15, 2003
posts:53
votes: 0


you could give the url some kind of session id which expires after a certain amount of time.
10:23 am on Aug 13, 2004 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Aug 8, 2004
posts:1679
votes: 0


how do i prevnt some from bookmark a page in asp or vb script?

Why?

10:38 am on Aug 16, 2004 (gmt 0)

New User

10+ Year Member

joined:Aug 13, 2004
posts:4
votes: 0


Hi!

The problem is that pages after the login page is been bookmarked. Want I need to happen,is to make all pages after the login page unattainable, so if a user needs to view a page he would have to login again.

Can it be done?

10:52 am on Aug 16, 2004 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Aug 8, 2004
posts:1679
votes: 0


Want I need to happen,is to make all pages after the login page unattainable, so if a user needs to view a page he would have to login again.

Per se bookmarking is totally under control of the end user - you can have some funny games with POST requests which are hard (if possible) to bookmark, but this is not good way of solving your problem.

If you want to allow access to only authenticated users then your pages after login page should check for login cookie(s) set by the login page, if cookie(s) not set then ask to login then show content relevant to the page originally requested.

11:34 am on Aug 16, 2004 (gmt 0)

New User

10+ Year Member

joined:Aug 13, 2004
posts:4
votes: 0


Can this be done in asp?
And it wud not be necessary for the browser to allow session cookies?
11:56 am on Aug 16, 2004 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Aug 8, 2004
posts:1679
votes: 0


Yes it can be done in ASP, the logic can be pretty simple:

1. login page - check username/password against database of allowed users, and if all matched then set cookie that will indicate that this user is authorised.

2. content page - if cookie is not set, then redirect to login, otherwise show content.

2:44 pm on Aug 16, 2004 (gmt 0)

New User

10+ Year Member

joined:Aug 13, 2004
posts:4
votes: 0


Thanks.
I'll try it out, and c if it works.
7:56 pm on Aug 25, 2004 (gmt 0)

Junior Member

10+ Year Member

joined:Aug 22, 2004
posts:59
votes: 0


or you could try the apache .htaccess files (if your server runns apache - probably dosn't since your in to asp)