SitePoint Sponsor

User Tag List

Results 1 to 12 of 12

Thread: hide the source

Hybrid View

  1. #1
    SitePoint Enthusiast sceptik's Avatar
    Join Date
    Sep 2011
    Posts
    40
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    hide the source

    Hi everyone! is it possible to hide the source code when you want to view it in browser..like CTRL + U or rightclick+view source code in order that nobody knows.
    thx.

  2. #2
    From Italy with love silver trophybronze trophy
    guido2004's Avatar
    Join Date
    Sep 2004
    Posts
    9,496
    Mentioned
    163 Post(s)
    Tagged
    4 Thread(s)
    No.
    Maybe you could disable it with javascript, but if someone wants to see it they can disable javascript. And I personally would never again visit a site that disables things like right mouse click.

  3. #3
    SitePoint Enthusiast sceptik's Avatar
    Join Date
    Sep 2011
    Posts
    40
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok I understand ) thx !)

  4. #4
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,812
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    There are some people who sell programs that supposedly prevent people viewing your page source for as much as several hundred dollars.

    All such programs can be defeated with a web browser and two lines of JavaScript.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  5. #5
    SitePoint Enthusiast Adam Chrapkowski's Avatar
    Join Date
    Sep 2011
    Location
    Poland
    Posts
    42
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It is absolutely impossible to hide the page code. Web pages are not compiled so you can see everything which is send to the browser.

  6. #6
    One website at a time mmj's Avatar
    Join Date
    Feb 2001
    Location
    Melbourne Australia
    Posts
    6,282
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    If you're talking HTML, you can't hide it, and the best you could do to obfuscate it would be just to make it difficult to follow (remove line breaks, use non-semantic class names, liberal use of numeric character entities, etc) which is almost certainly a bad idea.
    [mmj] My magic jigsaw
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    The Bit Depth Blog Twitter Contact me
    Neon Javascript Framework Jokes Android stuff

  7. #7
    SitePoint Member JohnAadams's Avatar
    Join Date
    Oct 2011
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes the source code can be hidden with the help of java code.This is done to due to copying of meta tags or meta description and keywords.
    you can hide the source code in HTML or in PHP. No problem its really works with them .

  8. #8
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,812
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by JohnAadams View Post
    Yes the source code can be hidden with the help of java code.This is done to due to copying of meta tags or meta description and keywords.
    you can hide the source code in HTML or in PHP. No problem its really works with them .
    You left out the flying pigs. That solution will only work if you own at least a trillion flying pigs and keep them all in a matchbox under your bed.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  9. #9
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,177
    Mentioned
    454 Post(s)
    Tagged
    8 Thread(s)
    Quote Originally Posted by felgall View Post
    That solution will only work if you own at least a trillion flying pigs
    Pls help me dear.I not know where to get enough pigs. I not have many $$ to buy so I hop they are free. Pls help.

    EDIT: p.s. where I also can get bigger bed?

  10. #10
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,812
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by ralph.m View Post
    Pls help me dear.I not know where to get enough pigs. I not have many $$ to buy so I hop they are free. Pls help.

    EDIT: p.s. where I also can get bigger bed?
    Does that mean you already have a big enough matchbox?

    Not sure where you'd get free flying pigs from. They seem to be in short supply at the moment at any price.

    For anyone looking for the opposite of source code protection - ie a way of getting readable source code for any web page where you have mistakenly obfuscated the source and now need to work out what the original looked like then see http://javascriptexample.net/viewsource.php for a bookmarklet and userscript that you can add to your browser to make accessing the readable version of the source easier.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  11. #11
    SitePoint Addict
    Join Date
    Apr 2009
    Posts
    357
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    You can get flying pigs anywhere you can get pigs

    See #3 in rfc1925. http://www.ietf.org/rfc/rfc1925.txt
    Doug G
    =====
    "If you ain't the lead dog, the view is always the same - Anon

  12. #12
    Life is not a malfunction gold trophysilver trophybronze trophy
    TechnoBear's Avatar
    Join Date
    Jun 2011
    Location
    Argyll, Scotland
    Posts
    6,177
    Mentioned
    264 Post(s)
    Tagged
    5 Thread(s)
    Quote Originally Posted by ralph.m View Post
    Pls help me dear.I not know where to get enough pigs. I not have many $$ to buy so I hop they are free. Pls help.
    Gladly.

    Pig_flies.gif


Bookmarks

Posting Permissions

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