Forum Moderators: mack

Message Too Old, No Replies

prevent bookmarking

         

shani

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

10+ Year Member



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

topr8

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

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



you can't stop someone bookmarking a page.

nobody

10:12 am on Aug 13, 2004 (gmt 0)

10+ Year Member



you could give the url some kind of session id which expires after a certain amount of time.

Lord Majestic

10:23 am on Aug 13, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



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

Why?

shani

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

10+ Year Member



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?

Lord Majestic

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

WebmasterWorld Senior Member 10+ Year Member



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.

shani

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

10+ Year Member



Can this be done in asp?
And it wud not be necessary for the browser to allow session cookies?

Lord Majestic

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

WebmasterWorld Senior Member 10+ Year Member



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.

shani

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

10+ Year Member



Thanks.
I'll try it out, and c if it works.

Adrian2k4

7:56 pm on Aug 25, 2004 (gmt 0)

10+ Year Member



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