Browse DevX
Sign up for e-mail newsletters from DevX

Tip of the Day
Language: Client Scripting
Expertise: Beginner
Oct 18, 1999



Building the Right Environment to Support AI, Machine Learning and Deep Learning

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.

DevX Pro
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date