Disable View source

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Roman

    Disable View source

    Hello to everybody,
    I have some question concerning blocking view source from main menu of
    IE or MF. I am able to block right click with <body
    oncontextmenu=" return false"> but still missing from main View->Source
    Code.
    Any hints ?
    Regards,
    Roman

  • RobG

    #2
    Re: Disable View source

    Roman wrote:[color=blue]
    > Hello to everybody,
    > I have some question concerning blocking view source from main menu of
    > IE or MF. I am able to block right click with <body
    > oncontextmenu=" return false"> but still missing from main View->Source
    > Code.[/color]

    You only think you can, you can't prevent that reliably at all. There
    are many ways of viewing the source other than via right-click or
    browser menus.

    [color=blue]
    > Any hints ?[/color]

    Yes, don't even try. Anything you publish on a web server can be viewed
    and saved by someone visiting the site. If you don't want that, don't
    publish it.


    --
    Rob

    Comment

    • John Bokma

      #3
      Re: Disable View source

      "Roman" <roman.janowczy k@gmail.com> wrote:
      [color=blue]
      > Hello to everybody,
      > I have some question concerning blocking view source from main menu of
      > IE or MF. I am able to block right click with <body
      > oncontextmenu=" return false"> but still missing from main View->Source
      > Code.
      > Any hints ?[/color]

      Don't waste your time and don't annoy your visitors. Your source is
      probably not worth to be stolen in the first place.

      --
      John MexIT: http://johnbokma.com/mexit/
      personal page: http://johnbokma.com/
      Experienced programmer available: http://castleamber.com/
      Happy Customers: http://castleamber.com/testimonials.html

      Comment

      • Ivo

        #4
        Re: Disable View source


        "Roman" <roman.janowczy k@gmail.com> asks[color=blue]
        > I have some question concerning blocking view source from main menu of
        > IE or MF. I am able to block right click[/color]

        Sorry, but no, you are not.
        [color=blue]
        > with <body oncontextmenu=" return false"> but still missing from main
        > View->Source Code.
        > Any hints ?[/color]

        There is no way you can hide your source from us or anybody. All you can do
        is discourage people. If the browser is to display a page, the raw code must
        be present on the user's hard disk, if directly not accessible from the main
        menu due to scripts, frames and whathaveyou, then certainly from the
        Temporary Internet Files folder, or by whatever name the cache may be known
        locally.

        And this little beauty of a bookmarklet restores all kinds of menus:

        javascript:(fun ction(w){for(va r%20i=0;i<w.len gth;i++){argume nts.callee(w.fr a
        mes[i]);}try{function %20n(r){r.oncli ck=r.oncontextm enu=r.onmousedo wn=r.onmou
        seup=null;}n(w. document);n(w.d ocument.body);} catch(e){alert( 'Bookmarklet%20 f
        ailed:\n\n'+e.m essage);}})(top );

        Really, it is more productive to put your energy into more fruitful
        endeviours such as authoring innovative pages that people will want to come
        and see, than hiding source code. If it is confidential, it doesn't belong
        on the web.
        --
        hth
        ivo



        Comment

        • Ed Jay

          #5
          Re: Disable View source

          RobG <rgqld@iinet.ne t.au> wrote:
          [color=blue]
          >Roman wrote:[color=green]
          >> Hello to everybody,
          >> I have some question concerning blocking view source from main menu of
          >> IE or MF. I am able to block right click with <body
          >> oncontextmenu=" return false"> but still missing from main View->Source
          >> Code.[/color]
          >
          >You only think you can, you can't prevent that reliably at all. There
          >are many ways of viewing the source other than via right-click or
          >browser menus.
          >[color=green]
          >> Any hints?[/color][/color]

          While anyone with a will can see everything you've published and there's
          nothing you can do stop that, there are several things you can do to
          dissuade the casual looky-Lou from peaking at your code.[color=blue]
          >
          >Yes, don't even try. Anything you publish on a web server can be viewed
          >and saved by someone visiting the site. If you don't want that, don't
          >publish it.[/color]

          I think there should be a way to hide proprietary code. The need exists
          and it's going to get bigger as hosted software becomes more commonly
          used.

          I'm about to market web-hosted medical diagnostic software that employs a
          few proprietary algorithms. I've taken great measures to assure the app
          isn't stolen, but I know that somewhere out there is a 13-year old,
          pimply-faced kid wearing big glasses and a big grin who could get the code
          if the mood struck him.

          I wonder how owners of web-hosted applications are going to secure the
          integrity of their ownership...

          --
          Ed Jay (remove M to respond by email)

          Comment

          • John Bokma

            #6
            Re: Disable View source

            Ed Jay <edMbj@aes-intl.com> wrote:
            [color=blue]
            > I wonder how owners of web-hosted applications are going to secure the
            > integrity of their ownership...[/color]

            They host the data as well.

            --
            John MexIT: http://johnbokma.com/mexit/
            personal page: http://johnbokma.com/
            Experienced programmer available: http://castleamber.com/
            Happy Customers: http://castleamber.com/testimonials.html

            Comment

            • RobG

              #7
              Re: Disable View source

              Ed Jay wrote:[color=blue]
              > RobG <rgqld@iinet.ne t.au> wrote:
              >
              >[color=green]
              >>Roman wrote:
              >>[color=darkred]
              >>>Hello to everybody,
              >>>I have some question concerning blocking view source from main menu of
              >>>IE or MF. I am able to block right click with <body
              >>>oncontextmen u="return false"> but still missing from main View->Source
              >>>Code.[/color]
              >>
              >>You only think you can, you can't prevent that reliably at all. There
              >>are many ways of viewing the source other than via right-click or
              >>browser menus.
              >>
              >>[color=darkred]
              >>>Any hints?[/color][/color]
              >
              >
              > While anyone with a will can see everything you've published and there's
              > nothing you can do stop that, there are several things you can do to
              > dissuade the casual looky-Lou from peaking at your code.[/color]

              What sort of threat - security or competitive - do such persons present?
              How does preventing access to source code prevent anyone from
              implementing a copy of your site? Getting the source code has never
              been a requirement for knocking-off your competition.

              [color=blue][color=green]
              >>Yes, don't even try. Anything you publish on a web server can be viewed
              >>and saved by someone visiting the site. If you don't want that, don't
              >>publish it.[/color]
              >
              >
              > I think there should be a way to hide proprietary code. The need exists
              > and it's going to get bigger as hosted software becomes more commonly
              > used.[/color]

              A couple of methods spring to mind - there are others:

              1. Provide downloadable binary executables - failed
              2. Applets (Java, ActiveX) - rare, mistrusted
              3. Xwindows and suitable X-client - never got off the ground
              4. CORBA/IIOP barely drew breath - total failure

              [color=blue]
              > I'm about to market web-hosted medical diagnostic software that employs a
              > few proprietary algorithms. I've taken great measures to assure the app
              > isn't stolen, but I know that somewhere out there is a 13-year old,
              > pimply-faced kid wearing big glasses and a big grin who could get the code
              > if the mood struck him.[/color]

              What will he/she do with it? How come eBay takes no precautions what so
              ever? Or Google? Or even MSN? Because the value is in the service,
              not the code.

              You may as well complain that your competitors copied your idea of
              putting in a front door to let the customers in. :-)

              [color=blue]
              > I wonder how owners of web-hosted applications are going to secure the
              > integrity of their ownership...[/color]

              Those that try fail. Winners base their business on providing the best
              service - their sites are kept up-to-date, they run efficiently in
              (nearly) any browser, they offer useful content, they are open and
              welcoming.



              --
              Rob

              Comment

              • VK

                #8
                Re: Disable View source


                Ivo wrote:[color=blue]
                > There is no way you can hide your source from us or anybody. All you can do
                > is discourage people. If the browser is to display a page, the raw code must
                > be present on the user's hard disk, if directly not accessible from the main
                > menu due to scripts, frames and whathaveyou, then certainly from the
                > Temporary Internet Files folder, or by whatever name the cache may be known
                > locally.[/color]

                To be fair there is a way to have View > Page Source grayed out (not
                available). But it is not achievable by client-side scripting. One need
                to send a right sequence of response headers from the server. It is
                also not supported by all browsers, and where supported it smashes down
                the browser caching mechanics.

                But it is an absolute true: service is the key to success, not a copy
                protection. One should go by the presumption of innocence and do not
                look at *your* future visitors as a bunch of thiefs. (But still think
                of them as of a bunch of experienced server hackers - it is paranoidal
                and it is *not* true, but it's the way to build a secure server
                solution).

                It is very difficult to believe when reading Internet news :-), but in
                the most part these are the same people used to work for money and
                respect someone else's property. The rest sign off for "shrink" (as
                it's called in grocery stores).

                Comment

                • Evertjan.

                  #9
                  Re: Disable View source

                  VK wrote on 13 jan 2006 in comp.lang.javas cript:
                  [color=blue]
                  > To be fair there is a way to have View > Page Source grayed out (not
                  > available). But it is not achievable by client-side scripting.[/color]

                  Try this to gray it out:

                  <http://devrijehuisarts .org/test/noViewSource.as p>

                  [sorry, no clientside script]

                  ;-)

                  --
                  Evertjan.
                  The Netherlands.
                  (Please change the x'es to dots in my emailaddress)

                  Comment

                  • VK

                    #10
                    Re: Disable View source


                    Evertjan. wrote:[color=blue]
                    > Try this to gray it out:
                    >
                    > <http://devrijehuisarts .org/test/noViewSource.as p>[/color]

                    Right, I meant similar trick, and (besides other drawbacks) IE is the
                    only one (at least on Windows) who buys it.

                    Comment

                    • Randy Webb

                      #11
                      Re: Disable View source

                      Evertjan. said the following on 1/13/2006 4:37 AM:[color=blue]
                      > VK wrote on 13 jan 2006 in comp.lang.javas cript:
                      >
                      >[color=green]
                      >>To be fair there is a way to have View > Page Source grayed out (not
                      >>available). But it is not achievable by client-side scripting.[/color]
                      >
                      >
                      > Try this to gray it out:
                      >
                      > <http://devrijehuisarts .org/test/noViewSource.as p>
                      >
                      > [sorry, no clientside script]
                      >
                      > ;-)
                      >[/color]

                      You need to update that image to say "This page has no view-source in
                      Internet Explorer but it does in Firefox".

                      Right click>View Page Source

                      Not of much use to you but it will give you some source code :)

                      --
                      Randy
                      comp.lang.javas cript FAQ - http://jibbering.com/faq & newsgroup weekly
                      Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/

                      Comment

                      • Evertjan.

                        #12
                        Re: Disable View source

                        VK wrote on 13 jan 2006 in comp.lang.javas cript:
                        [color=blue]
                        >
                        > Evertjan. wrote:[color=green]
                        >> Try this to gray it out:
                        >>
                        >> <http://devrijehuisarts .org/test/noViewSource.as p>[/color]
                        >
                        > Right, I meant similar trick, and (besides other drawbacks) IE is the
                        > only one (at least on Windows) who buys it.
                        >
                        >[/color]

                        I doubt FF can be fooled.

                        --
                        Evertjan.
                        The Netherlands.
                        (Please change the x'es to dots in my emailaddress)

                        Comment

                        • Paul Cooper

                          #13
                          Re: Disable View source

                          On Fri, 13 Jan 2006 03:25:30 GMT, RobG <rgqld@iinet.ne t.au> wrote:
                          [color=blue]
                          >Ed Jay wrote:[color=green]
                          >> RobG <rgqld@iinet.ne t.au> wrote:[/color][/color]
                          [color=blue]
                          >
                          >A couple of methods spring to mind - there are others:
                          >
                          > 1. Provide downloadable binary executables - failed
                          > 2. Applets (Java, ActiveX) - rare, mistrusted
                          > 3. Xwindows and suitable X-client - never got off the ground
                          > 4. CORBA/IIOP barely drew breath - total failure
                          >
                          >[/color]

                          Takes deep breath in anticipation of flames:

                          Use JSP or PHP or ASP to keep the processing server side?

                          If the data are client side, then you're sunk - you either have to
                          download an application (applet, OCX or plugin), or trust your users.

                          There simply isn't a Javascript answer, which puts it out of scope for
                          this newsgroup.

                          Paul

                          Comment

                          • Patient Guy

                            #14
                            Re: Disable View source

                            Ed Jay <edMbj@aes-intl.com> wrote in
                            news:bqsds15tjt 4tt21kdf7fe9ro2 acl5lmg5m@4ax.c om:
                            [color=blue]
                            > RobG <rgqld@iinet.ne t.au> wrote:
                            >[color=green]
                            >>Roman wrote:[color=darkred]
                            >>> Hello to everybody,
                            >>> I have some question concerning blocking view source from main menu
                            >>> of IE or MF. I am able to block right click with <body
                            >>> oncontextmenu=" return false"> but still missing from main
                            >>> View->Source Code.[/color]
                            >>
                            >>You only think you can, you can't prevent that reliably at all. There
                            >>are many ways of viewing the source other than via right-click or
                            >>browser menus.
                            >>[color=darkred]
                            >>> Any hints?[/color][/color]
                            >
                            > While anyone with a will can see everything you've published and
                            > there's nothing you can do stop that, there are several things you can
                            > do to dissuade the casual looky-Lou from peaking at your code.[/color]

                            The "casual looky-Lou" most likely has no interest in your code, which
                            might actually be very badly written and poorly instructive.

                            Those determined to see your code who have even a modicum of talent will
                            get past your vain attempts to frustrate them.

                            In getting to the script, some people would answer to those asking the
                            question of how one sees the Javascript in the delivered document: "if
                            you have to ask, you probably don't need to know the answer."



                            Comment

                            • Jasen Betts

                              #15
                              Re: Disable View source

                              On 2006-01-13, Ed Jay <edMbj@aes-intl.com> wrote:[color=blue]
                              > RobG <rgqld@iinet.ne t.au> wrote:
                              >[color=green]
                              >>Roman wrote:[color=darkred]
                              >>> Hello to everybody,
                              >>> I have some question concerning blocking view source from main menu of
                              >>> IE or MF. I am able to block right click with <body
                              >>> oncontextmenu=" return false"> but still missing from main View->Source
                              >>> Code.[/color]
                              >>
                              >>You only think you can, you can't prevent that reliably at all. There
                              >>are many ways of viewing the source other than via right-click or
                              >>browser menus.
                              >>[color=darkred]
                              >>> Any hints?[/color][/color]
                              >
                              > While anyone with a will can see everything you've published and there's
                              > nothing you can do stop that, there are several things you can do to
                              > dissuade the casual looky-Lou from peaking at your code.[color=green]
                              >>
                              >>Yes, don't even try. Anything you publish on a web server can be viewed
                              >>and saved by someone visiting the site. If you don't want that, don't
                              >>publish it.[/color]
                              >
                              > I think there should be a way to hide proprietary code. The need exists
                              > and it's going to get bigger as hosted software becomes more commonly
                              > used.[/color]

                              activex ?
                              [color=blue]
                              > I'm about to market web-hosted medical diagnostic software that employs a
                              > few proprietary algorithms. I've taken great measures to assure the app
                              > isn't stolen, but I know that somewhere out there is a 13-year old,
                              > pimply-faced kid wearing big glasses and a big grin who could get the code
                              > if the mood struck him.
                              >
                              > I wonder how owners of web-hosted applications are going to secure the
                              > integrity of their ownership...[/color]



                              --

                              Bye.
                              Jasen

                              Comment

                              Working...