Results 1 to 6 of 6

Thread: how to disable right click to view source code ?

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jun 2002
    Location
    VIETNAM
    Posts
    209

    how to disable right click to view source code ?

    Would you please tell me how to disable right click to view source code of website?

  2. #2
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906
    Here how to do it in Internet Explorer:

    http://www.winguides.com/registry/display.php/442/

    If you are talking about how to do it on a clients computer, from a web page. Then the answer is, you cannot prevent the user from viewing the source code.
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  3. #3
    Frenzied Member Acidic's Avatar
    Join Date
    Sep 2003
    Location
    UK
    Posts
    1,090
    all they have to do is go to:
    view-source:http://www.yoursite.com to get it. or they can use an application, essentially a browser which doesn't parse the code. (which can be made in about 3 minutes)
    Have I helped you? Please Rate my posts.

  4. #4
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906
    Originally posted by Acidic
    all they have to do is go to:
    view-source:http://www.yoursite.com to get it. or they can use an application, essentially a browser which doesn't parse the code. (which can be made in about 3 minutes)
    In IE that restriction will disable it completely. But then there is nothing stopping the user from downloading another web browser such as lynx and using that to dump the source in a text file.
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  5. #5
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    They can disable JavaScript. They can use wget (or a similar download app) to get the code. Mozilla 1.7 has a specific option to force enable the right-click menu.


    Bottom Line: trying to hide your source from the user is pointless and annoying.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  6. #6
    Frenzied Member Acidic's Avatar
    Join Date
    Sep 2003
    Location
    UK
    Posts
    1,090
    why do you want to block the source code? maybe we can find a workaround, obviously the best one would be to use a server side language.
    Have I helped you? Please Rate my posts.

Posting Permissions

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



Click Here to Expand Forum to Full Width