Results 1 to 6 of 6

Thread: How Can I prevent people from saving my webpage/site?

  1. #1
    Join Date
    Mar 2007
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Smile How Can I prevent people from saving my webpage/site?

    Hi, Is there any code, that would prevent users from saving the webpage or viewing the source code.

    I did try html protector/encrpter that only works well with Interent explorer but in mozilla firefox you can easily view all the sourcecode.

    Is there any script that will disable people from the saving the entire webpage or atleast hide the source code in all browsers.


    thank you.

  2. #2
    Join Date
    Oct 2008
    Location
    Sweden
    Posts
    2,023
    Thanks
    17
    Thanked 319 Times in 318 Posts
    Blog Entries
    3

    Default

    Not possible, if the browser can see the page, the user can view the source code and save the page. Here is another thread that deals with the issue, I suggest you do a search next time..
    http://www.dynamicdrive.com/forums/showthread.php?t=2184
    Eddy Proca
    I love Dropbox. Get it through my girlfriend's referral link (I reached my limit) and both you and her get 500 MB extra! Thanks and you're welcome!

  3. #3
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    the thing that lots of people don't "get" is that, in order to view a webpage, the user's computer must first save and then display the page (source code), not view it first and then save it. It's not like TV, where viewing and saving are separate things. Preventing the user from saving the source would also prevent them from viewing the page.

  4. #4
    Join Date
    Dec 2008
    Location
    Nigeria
    Posts
    97
    Thanks
    3
    Thanked 8 Times in 8 Posts

    Default

    Quote Originally Posted by traq View Post
    the thing that lots of people don't "get" is that, in order to view a webpage, the user's computer must first save and then display the page (source code), not view it first and then save it. It's not like TV, where viewing and saving are separate things. Preventing the user from saving the source would also prevent them from viewing the page.
    Yes you can, if you load in the contents dynamically with ajax, u cant save it perfectly, at least not the innerHTML property fetched via ajax. Then u can prevent your images from being downloaded at least not as easily as saving pages by encapsulating them in style sheets, i cant fully explain this, but if u need it u can tell me, i will post a private example to u.

    Then, there was something i saw once on a microsoft website, it actually cleared out the code from browser, i dont know how it did it, there was just this huge gap, i was tryin to lift a code [i cant remember what code now], but i was not able to finish up with that.

  5. #5
    Join Date
    Oct 2008
    Location
    Sweden
    Posts
    2,023
    Thanks
    17
    Thanked 319 Times in 318 Posts
    Blog Entries
    3

    Default

    OMG, admin please close this thread!
    Eddy Proca
    I love Dropbox. Get it through my girlfriend's referral link (I reached my limit) and both you and her get 500 MB extra! Thanks and you're welcome!

  6. #6
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,878
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Yes you can, if you load in the contents dynamically with ajax, u cant save it perfectly, at least not the innerHTML property fetched via ajax. Then u can prevent your images from being downloaded at least not as easily as saving pages by encapsulating them in style sheets, i cant fully explain this, but if u need it u can tell me, i will post a private example to u.
    Wrong. It's perfectly possible still. For example, simply execute the Javascript:
    Code:
    javascript:void(document.body.innerHTML = "<pre>" + document.body.innerHTML.toString().replace(/&/g, "&amp;").replace(/</g, "&lt;") + "</pre>");
    Dinold, you should ask yourself: why do you even want to do this? Are you ashamed of your code? Or are you merely feeling malicious and wanting to make it harder for Web-design newbies to learn from the Web? The Web is by its very nature open. Accept it, or design an alternative (though I doubt many people would switch ).

    Thread closed; there are a large number of other threads already discussing this.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •