Prevent Certain Files From Being Bookmarked

Prevent Certain Files From Being Bookmarked

How can I prevent certain files on my site from being bookmarked?


There is no way to fully prevent people from bookmarking a certain URL on your site. As long someone can navigate to a page (or a file), they can save that URL as a bookmark. That said, you can certainly make it harder for people to bookmark certain pages. One tactic is to use frames. You can create a frameset that has a single document that uses the whole window. Like this:

The document you reference from this frameset (myfirstdoc.htm) will be displayed without any evidence that you’re using frames. When users follow links from this page, the URL in their browser’s address bar won’t change. When they try to add a bookmark to the page they’re on, they’ll actually bookmark your frameset document.


Share the Post: