How can I prevent visitors from accessing Properties, Page Source & Page Info?

Discussion in 'HTML & Website Design' started by Advice Pro, Apr 20, 2010.

  1. #1
    These 3 Things are listed in the context menu (right click menu). I don't want to prevent access to that menu because visitors might have different uses for it such as with add-ons, bookmarking & other shortcuts!
     
    Advice Pro, Apr 20, 2010 IP
  2. javier.garcia.esteban

    javier.garcia.esteban Well-Known Member

    Messages:
    66
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    118
    #2
    You can't. You shouldn't. Why would you?.

    Didn't understand a thing... I don't see the relation of "add-ons, bookmarking & other shortcuts" with browser's contextual menu.
     
    javier.garcia.esteban, Apr 20, 2010 IP
  3. Piggy

    Piggy Active Member

    Messages:
    574
    Likes Received:
    9
    Best Answers:
    1
    Trophy Points:
    70
    #3
    This code will disable right click on your page:
    <script language="JavaScript1.1"> 
    // distributed by http://www,hypergurl.com <!-- var debug = true; function 
    right(e) { if (navigator.appName == 'Netscape' && (e.which == 3 || e.which 
    == 2)) return false; else if (navigator.appName == 'Microsoft Internet Explorer' 
    && (event.button == 2 || event.button == 3)) { alert('This Page is fully 
    protected!'); return false; } return true; } document.onmousedown=right; if (document.layers) 
    window.captureEvents(Event.MOUSEDOWN); window.onmousedown=right; //--></script>
    Code (markup):
    (Note: This is not my code, I got it from http://www.hypergurl.com/norightclick.html)


    As for hiding your source... You can somewhat do it in javascript by calling an external file instead of typing the code on the page, but if you call the javascript externally, you could still load that javascript file yourself and view the contents. Nothing would be hidden. If your browser can read it, so can anything else. This will just make your source harder to view.
     
    Piggy, Apr 20, 2010 IP
  4. digital29

    digital29 Peon

    Messages:
    462
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Properties, Page source and Page info it`s not an option of your site, it`s an option of the browser..so there is nothing you can do.
    As Piggy said, you can disable right click...but there are more ways too see the info, besides right click
     
    digital29, Apr 20, 2010 IP
  5. VarriaStudios

    VarriaStudios Member

    Messages:
    246
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    28
    #5
    flash can be your best bet.
     
    VarriaStudios, Apr 20, 2010 IP
  6. Piggy

    Piggy Active Member

    Messages:
    574
    Likes Received:
    9
    Best Answers:
    1
    Trophy Points:
    70
    #6
    Or, you could design the site completely in VB... lol
     
    Piggy, Apr 20, 2010 IP