Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. Avoid viewing source code

Avoid viewing source code

Scheduled Pinned Locked Moved Web Development
6 Posts 6 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    sirisha guttikonda
    wrote on last edited by
    #1

    Hi all. Is is possible to avoid viewing source code of a web page. i can disable mouse right click... and i want to restrict from menu options also.. is it possible. Thank you.

    siri

    J L S P P 5 Replies Last reply
    0
    • S sirisha guttikonda

      Hi all. Is is possible to avoid viewing source code of a web page. i can disable mouse right click... and i want to restrict from menu options also.. is it possible. Thank you.

      siri

      J Offline
      J Offline
      Johnny
      wrote on last edited by
      #2

      No, no, and no. If you do disable the right-mouse all you succeed in doing is annoying people, and not restricting anything.

      1 Reply Last reply
      0
      • S sirisha guttikonda

        Hi all. Is is possible to avoid viewing source code of a web page. i can disable mouse right click... and i want to restrict from menu options also.. is it possible. Thank you.

        siri

        L Offline
        L Offline
        L Viljoen
        wrote on last edited by
        #3

        Bad idea, since if someone really wants your sourcecode they can just click on file and save as, "wholla instant source", or they can go to their web page cache ect. if it javascript you wish to secure from other developers viewing it you can always use a util that takes out indentation making it harder to read, but then again you can just open Notpad 2 and indent it automatically :)

        Le Roux Viljoen Web Developer PCW New Media South African Branch www.pcwnewmedia.com

        1 Reply Last reply
        0
        • S sirisha guttikonda

          Hi all. Is is possible to avoid viewing source code of a web page. i can disable mouse right click... and i want to restrict from menu options also.. is it possible. Thank you.

          siri

          S Offline
          S Offline
          stevio
          wrote on last edited by
          #4

          No. There's also very little reason to do it. Writing HTML / CSS markup isn't exactly rocket science, and if someone wants to copy the design of your site, they hardly need the source code to do it. Pretty much anything that's sent out from your webserver must be considered publically accessible. If you're trying to hide the source for application security / authentication reasons then you have more serious problems. Don't do this under any circumstances. Please.

          1 Reply Last reply
          0
          • S sirisha guttikonda

            Hi all. Is is possible to avoid viewing source code of a web page. i can disable mouse right click... and i want to restrict from menu options also.. is it possible. Thank you.

            siri

            P Offline
            P Offline
            Perspx
            wrote on last edited by
            #5

            If you want to do what stevio said, in terms of user authentication.. or if you can, just use a server-side scripting language such as PHP, CGI or ASP. Regards, --Perspx

            "When programming in Visual Basic, you can always know whether a given program will become stuck in a loop and never halt. The answer is 'yes'." - Uncyclopedia

            1 Reply Last reply
            0
            • S sirisha guttikonda

              Hi all. Is is possible to avoid viewing source code of a web page. i can disable mouse right click... and i want to restrict from menu options also.. is it possible. Thank you.

              siri

              P Offline
              P Offline
              Paul Conrad
              wrote on last edited by
              #6

              No not entirely possible. You can disable right clicking of the mouse but that'll just annoy people.

              "The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups