Question:
I need an html/javascript that prevents users from saving a web page?
ppp
2006-03-13 10:41:42 UTC
I would like to add a code to my secure page to prevent users from saving it on their computer.
Eight answers:
2006-03-13 11:34:09 UTC
The following commands work in some browsers to stop the page caching. But as has been said, trying to protect a page is pointless. There are a million and 1 ways to get around all methods of hiding code. Just enjoy your coding and know that just as you will take ideas from others, they will take them from you.





2006-03-13 14:09:08 UTC
Everyone is right. No script exists that can stop someone from downloading your page. But you can scramble the source so that they cannot see how the page was written. Therefore they cannot steal parts of the code.



Note: before scrambling your source code it might be a good idea to put a senetence on your page saying "Copyright (c) 2006 Your Name Here All Rights Reserved" so everyone knows who your page belongs to. After the page is scrambled they won't be able to get rid of the copyright. :)



Copy and paste your HTML source code into this tool.

http://www.voormedia.com/en/tools/html-obfuscate-scrambler.php



Then click the "create scrambled html" button. Now copy and paste the scrambeld html into your hatml editor and save it.



DO NOT DESTROY THE ORIGINAL FILE IN CASE YOU WANT TO MAKE CHANGES AT A LATER DATE!



Now no one will want to take your page.
2006-03-13 11:21:13 UTC
There is no way of doing it. You can disable the right click option, but usually if you hold down the left button then click on the right button you will override the JavaScript.



No matter what you do someone can steal your code by viewing source. Someone can easily steal your images but taking a screen capture.



Its a futile effort that will not work
the_dadd_from_tn2005
2006-03-13 13:50:40 UTC
Well, I've actually seen web pages that also disable the "View Source" menu item in the "View" menu of Internet Explorer. And I have written a script that does not allow the right-mouse button to be clicked at all. The most common example of that is a custom context menu, instead of the IE context menu for right-click.
umterpy2
2006-03-13 12:49:04 UTC
There are ways to hide your source code from others - wrap it in a different non-displaying language like ASP. But the actual page that is served can still be saved. So if you want to avoid them from saving your source, that's one thing - but saving what gets displayed in the browser itself is another
bradyb
2006-03-13 10:55:09 UTC
If the page can be viewed in a web browser it can be saved. It's that simple.
2006-03-13 10:50:10 UTC
That is not possible. If you serve the page and allow me to access it, I can save the information.
2016-03-13 10:55:39 UTC
If you only want certain machines to be able to access the stated pages, you can do something like: Dim s s = Request.ServerVariables ("REMOTE_ADDR") ' if not acceptable addresses then redirect if s <> "127.0.0.1" and s <> "127.0.0.2" then Response.Redirect "Your URL" end if


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...