[Webinar] Streamline your web hosting managementRegister Today

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 202
  • Last Modified:

freventing bookmarking of specific pages

Is it possible to prevent the bookmarking of specific pages on my site? I would like visitors to only be able to access the pages through my site or perhaps a specific link somewhere.

1 Solution
Couldn't you use some kind of form value on an entry page so that if this page of yours doesn't receive the value it redirects the user to another page.
When you retrieve a webpage from a webserver it is possible to analyze where the link to this page has been coming from. It is stored in a variable called the "REFERRER".

If you want to restrict the access to your script to one (or several) links it would be possible to achieve this but not by pure HTML. You would need a Perl script to do the analyzing part for you.

So I think it would be possible if you

1. generate your page dynamically e.g. by a Perl script
2. check the REFERRER-value of the client
3. deny the access if the referrer isn't a "legal" link

So let's say the only "legal" link is on

and your page is generated by this script:
$legal_link = 'http://www.onlyfromhere.com/mylinkpage.htm';

# check if link is legal
if ($ENV{HTTP_REFERER} eq $legal_link) {

  ... generate your page here ...

} else {

  ... generate "ACCESS DENIED" message here ...


This will also result in an "ACCESS DENIED" if the user has bookmarked your page. It will only show the contents if the surfers come in via your link!

If you think that this could work for you I will be glad to help you further with filling in the missing spaces in this script!


  The simplest way to do this is to have a frameset on the default page, with one frame set to 100%, and calling the content page, and the other frame set to 0%, and calling the blank page.  No matter where the client goes from that default page, your opening URL will be all the client sees in the location bar, and all they can bookmark without hacking the URLs out of the Property dialogs or the frameset.

  This feature is used by several NBC sites, and a few of the cnet sites.

<frameset rows="100%,0%" border=no framespacing = "0" bordercolor="FFFFFF">
    <frame src="content.asp" frameborder="NO" scrolling="auto" marginwidth="0" marginheight="0"  name="content">
    <frame src="blank.asp" frameborder="NO" scrolling="no" marginwidth="0" marginheight="0" name="blank">

cscott57Author Commented:

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now