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.

See also  5 Strategies for Supercharging Your CRM

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist