How to hide the source code?

by LiorN
11 replies
I was looking for a way to hide the site's source code

is there a diffrent code for html mobile page & for a wp based website?
whrer can it be found?

if there is, & I can hide the sorce code will it affect the google spider regarding the robot.txt for certain pages I want to not been followed
& does it affect the loading time of thw website?
#code #hide #mobile web site #source
  • Profile picture of the author rahmat
    I think there is no way to hide html source code on your website, since they are required to be downloaded by the browser so that it can show your website to the visitor.

    You maybe can add 'no right click' javascript code to 'hide' your source code, but that is not effective for advanced visitor. You can also add many new lines (above the fold) before your html source code, as a decoy being a blank source code.. but that is also not effective if your visitor is really looking into finding your html source code.

    Difference between html mobile page & wp based website:
    html mobile page has only
    1. html source code and
    2. css
    3. images
    while wp based website has
    1. php source code
    2. html source code, and
    3. css
    4. images
    On wp based website, your php source code are kept on the server, so your visitor can't see them. While, html source code, css, and images are delivered to the browser, hence visitor can see them.

    If you add many blank lines before the source code, it will increase the file-size of the page, and hence it may slow down the loading time of website. You need to test for the extend of slowing down.
    {{ DiscussionBoard.errors[5261212].message }}
    • Profile picture of the author Ricki Roma
      Originally Posted by rahmat View Post

      I think there is no way to hide html source code on your website, since they are required to be downloaded by the browser so that it can show your website to the visitor.
      .
      so Rahmat, basically I can go to every mobile website & see it's source code?

      p.s
      I've seen some designs by you in the 'showcse' thread : very nice work
      Signature

      Our Actions Proves What We Really Belive In

      {{ DiscussionBoard.errors[5261277].message }}
      • Profile picture of the author ghughes
        The HTML source code will always be visible unless you use some type of obfuscator. As rahmat said, you can use javascript to disable the right-click menu. This will prevent some novice users from getting to the source code.

        When I say the HTML code will be visible, I'm referring to the markup code that actually outputs to the browser. If you use a server-side language, such as PHP, ASP, ASP.net, etc. to generate your site pages, the actual server-side source code will not be visible - only the HTML code that is generated on the server and sent to the browser. This is important because HTML is fairly simple to generate for even novice web developers. The server side code is what you really want to protect since it contains commands to interact with your file system and/or a back-end database.

        WordPress was developed using PHP. When you download the WordPress source code, you will be able to see the code that creates a WordPress blog. If you simply open a WordPress blog in the browser and click the "View Source" menu option, you will not see this PHP code. You will only see the HTML code that was generated by the PHP on the server and sent to the browser. Basically, no one can copy your blog simply by copying the code they can see in the browser. They would have to get to your server to obtain your PHP files.

        If you really want to prevent anyone from viewing your HTML files, search the internet for "HTML obfuscator" or "web code obfuscator." You should find plenty of resources for encrypting the code to prevent visitors from seeing your code.

        If you develop website code with PHP, and you wish to sell the system you've created, you may want to look at a product like Zend to encode your PHP source code. This will allow you to distribute your product without risking your end users reselling your code.
        Signature

        Gary Hughes
        IT Services of Texas
        www.completesolutions.com

        {{ DiscussionBoard.errors[5261613].message }}
        • Profile picture of the author ghughes
          Note that I referenced WordPress just as an example of a web product that was developed using PHP. Mobile sites are developed using a variety of languages, including PHP.
          Signature

          Gary Hughes
          IT Services of Texas
          www.completesolutions.com

          {{ DiscussionBoard.errors[5261624].message }}
          • Profile picture of the author Ricki Roma
            Originally Posted by ghughes View Post

            Note that I referenced WordPress just as an example of a web product that was developed using PHP. Mobile sites are developed using a variety of languages, including PHP.
            WoW
            Thanks Gary

            I read it 3 times & what Rahmat wrote as well
            & I understand and appreciate your well explained answer

            Had no idea that you can create mobile web page with php (not that I know php)

            I learned alot from both of your answers
            Signature

            Our Actions Proves What We Really Belive In

            {{ DiscussionBoard.errors[5261699].message }}
            • Profile picture of the author WillR
              Originally Posted by Ricki Roma View Post

              WoW
              Thanks Gary

              I read it 3 times & what Rahmat wrote as well
              & I understand and appreciate your well explained answer

              Had no idea that you can create mobile web page with php (not that I know php)

              I learned alot from both of your answers
              You can create a mobile webpage using php, and that's what I do, however that is not going to stop someone stealing your design. The php code is mainly used to pull certain information from different files. Once the site displays to the visitor all the php code has been executed so they could still just view the page source and use the code they see.

              Personally I wouldn't worry about this and I don't see it being a big problem. If someone wants to steal something they will find a way of doing it. If they can't steal yours it doesn't mean they will then purchase a design from you, it just means they will go and steal a design from elsewhere. Just concentrate on getting more customers as that's where the real money is - not worrying about little things like this.
              {{ DiscussionBoard.errors[5262358].message }}
      • Profile picture of the author rahmat
        Originally Posted by LiorN View Post

        so Rahmat, basically I can go to every mobile website & see it's source code?

        p.s
        I've seen some designs by you in the 'showcse' thread : very nice work
        Hi LiorN,

        Yes, you can see the html source code.

        If the website owner uses html obfuscator, you will only see random gibberish code. But advanced user can still decode that.

        p.s.: no.. the screenshot in the showcase is not my design. I just posted the screen capture of mobile site developed by others.
        {{ DiscussionBoard.errors[5263880].message }}
  • Profile picture of the author bryson
    I wouldn't worry about it focus on building your business. If someone wants your design look at it as a compliment to your excellent talent. Even if you could protect it there would be someone who could get around it anyway.

    Everything online gets ripped off, web content, web design, programs, wso's, mp3, mp4, everything. Not saying its right, it just is.
    Signature
    Do You Do Local Lead Gen? Hate Cold Calling for New Clients? We Have the Solution.. Get Hot Offline Leads Today... These Leads WANT to hear from YOU!

    Sign Up Today and Get Clients!Local Lead Gen Leads
    {{ DiscussionBoard.errors[5262629].message }}
  • Profile picture of the author kavinb3netmobi
    If you want to protect the images in the files you encrypt, you should also enable and configure Image Protection .
    {{ DiscussionBoard.errors[5283616].message }}
  • Profile picture of the author ctzulu
    dynamicdrive pretty much has everything

    scramble it
    {{ DiscussionBoard.errors[5990787].message }}
  • Profile picture of the author Micah Medina
    Don't worry about HTML theft. Somebody who has the time to do that isn't making enough money to really be a threat to you.
    Signature


    {{ DiscussionBoard.errors[5991140].message }}

Trending Topics