Javascript to disable right click, ctrl+A, ctrl+c, ctrl+u

Discussion in 'JavaScript' started by rohansyco, Aug 6, 2011.

  1. #1
    Hi all,

    I am looking for a javascript by which I can disable the user to copy my content...

    The javascript should disable the right click
    Ctrl+a -- Select all command
    Ctrl+C -- Copy
    and
    Ctrl+U -- View Source

    or if there is any other better option then please tell me...

    I just want that no user can copy the content of my site....


    Thanks
    Please reply me soon...
     
    rohansyco, Aug 6, 2011 IP
  2. ModulesGarden

    ModulesGarden Active Member

    Messages:
    21
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    58
    #2
    There are few advices on the web but none of them will help if you wish your site to go public.
    Why? You can always download the website content using even simple scripts and nothing will prevent from copying.
    You should choose if you want it for private - block access to the page OR choose if its public - everyone will get access and the content will be public (which also means accessible for all).
     
    ModulesGarden, Aug 8, 2011 IP
  3. ActiveFrost

    ActiveFrost Notable Member

    Messages:
    2,072
    Likes Received:
    63
    Best Answers:
    3
    Trophy Points:
    245
    #3
    Even for personal use ? Get a life and take a look at this.
     
    ActiveFrost, Aug 8, 2011 IP
  4. rainborick

    rainborick Well-Known Member

    Messages:
    424
    Likes Received:
    33
    Best Answers:
    0
    Trophy Points:
    120
    #4
    ModulesGarden is absolutely correct. You cannot prevent people from copying any webpage you make available to the public. And when you disable control keys, you are making your site very unfriendly to users who have legitimate purposes for using them. Many people will never return to your site when it makes it difficult for them to use their browser. So it will hurt your site far more than it will ever help. Good luck!
     
    rainborick, Aug 8, 2011 IP
  5. dthoai

    dthoai Member

    Messages:
    106
    Likes Received:
    2
    Best Answers:
    1
    Trophy Points:
    38
    #5
    I have an idea, not sure 100% prevent user from copying your content. You should use flash to display your content. Your content should be converted to image. Your flash should check if it is loaded from your website or local.
     
    dthoai, Aug 9, 2011 IP
  6. rainborick

    rainborick Well-Known Member

    Messages:
    424
    Likes Received:
    33
    Best Answers:
    0
    Trophy Points:
    120
    #6
    It would be a bad idea to have major portions of a website's content in Flash because Google is the only search engine that reads Flash files. So you would be blocking 30-40% of search engine users from seeing your site unless you also provided HTML versions of your content - in which case, you would be no better off.
     
    rainborick, Aug 9, 2011 IP
  7. JohnnySchultz

    JohnnySchultz Peon

    Messages:
    277
    Likes Received:
    4
    Best Answers:
    7
    Trophy Points:
    0
    #7
    you cannot prevent people from copying contents from the internet even if you copyrighted them, when you published it online it can be copied by anyone from anywhere in the world. even if you block the common control keys I can still view the source code of your website by using Firebug or any developer toolbar or through the Menu bar or much easier I will just disable javascript then your content is done.
     
    JohnnySchultz, Aug 10, 2011 IP
  8. mmerlinn

    mmerlinn Prominent Member

    Messages:
    3,197
    Likes Received:
    819
    Best Answers:
    7
    Trophy Points:
    320
    #8
    By definition, your code MUST be uploaded to the user's computer in order for him to see your webpages.

    Once your code is on his computer, you NO LONGER CAN STOP HIM FROM COPYING IT. All you can do is frustrate legitimate users and drive them away.

    The ONLY sure-fire way to keep people from copying your webpage code, IS TO NEVER EVER UPLOAD YOUR CODE TO THE INTERNET.
     
    mmerlinn, Aug 27, 2011 IP