hide source

Discussion in 'HTML' started by me-ron, Mar 12, 2005.

  1. me-ron

    me-ron Guest

    How can I hide my code so people can't view my source
    me-ron, Mar 12, 2005
    #1
    1. Advertising

  2. me-ron wrote:
    > How can I hide my code so people can't view my source


    1) Open up your FTP client and log into your Web server.
    2) Highlight your *.html files.
    3) Find your keyboard and press the "Delete" key.

    And you're done!
    Leif K-Brooks, Mar 12, 2005
    #2
    1. Advertising

  3. me-ron wrote:
    > How can I hide my code so people can't view my source


    No one here will tell you because they are all premadonas and like to
    keep these things to themselves so no one else knows about them. But I
    refuse to be like everyone else so here is the code:

    To do this you have to use an undocumented feature of the header tag in
    HTML. The syntax is:

    <head hidecode="[true|false|script|tag_name]">

    true = all source is hidden
    false (the default) = no source is hidden
    script = just the script tags are hidden. (This is the most used
    feature because it only hides your Javascript or VB script)
    tag_name = you can choose a tag that you want hidden, like the object tag.

    Most of the time you will just want to use true. By default it is set
    to false (obviously or we would not be able to see any source code when
    we view source.

    Enjoy!
    --
    -=tn=-
    Travis Newbury, Mar 12, 2005
    #3
  4. me-ron wrote:
    > How can I hide my code so people can't view my source


    http://www.vortex-webdesign.com/help/hidesource.htm

    Brown's Law: The quality of HTML is inversely proportional to the
    desire to hide it. ...

    --
    -bts
    -This space intentionally left blank.
    Beauregard T. Shagnasty, Mar 12, 2005
    #4
  5. me-ron wrote:

    > How can I hide my code so people can't view my source


    You can't. The best you can do is incorporate your methods into PHP, CGI or
    the like. You then generate something that does not expose the methods like
    JavaScript often does (I am not entirely sure about applets).

    The Web is open. Don't hide your creation. If you have something to hide,
    perhaps you ought to revise your code.

    Roy

    --
    Roy Schestowitz
    http://schestowitz.com
    Roy Schestowitz, Mar 12, 2005
    #5
  6. Travis Newbury wrote:

    > me-ron wrote:
    > > How can I hide my code so people can't view my source

    >
    > To do this you have to use an undocumented feature of the header tag in
    > HTML. The syntax is:
    >
    > <head hidecode="[true|false|script|tag_name]">


    To the OP: please ignore this cargo-cult nonsense. This is a poor
    alternative to the proper solution, which is to configure your server to
    send the appropriate HTTP headers: content-visibility in this case. It
    uses the same values -- with the same effect -- as the hidecode
    attribute. However, the hidecode attribute was deprecated in HTML 2, and
    eventually browsers will stop supporting it (a few user agents --
    Googlebot and Firefox in particular -- don't support it now). However,
    the HTTP header will be with us forever.

    Keep up the great work!


    >
    > true = all source is hidden
    > false (the default) = no source is hidden
    > script = just the script tags are hidden. (This is the most used
    > feature because it only hides your Javascript or VB script)
    > tag_name = you can choose a tag that you want hidden, like the object tag.
    >
    > Most of the time you will just want to use true. By default it is set
    > to false (obviously or we would not be able to see any source code when
    > we view source.
    >
    > Enjoy!


    --
    Joel.
    Joel Shepherd, Mar 12, 2005
    #6
  7. Travis Newbury <> wrote:

    > To do this you have to use an undocumented feature of the header
    > tag in
    > HTML. The syntax is:
    >
    > <head hidecode="[true|false|script|tag_name]">


    That won't work alone; you also need the following attribute into the
    <head> tag:

    profile="rot13:V-jnag-gb-uvqr-zl-fbhepr-orpnhfr-V-nz-nfunzrq-bs-vg"

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
    Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html
    Jukka K. Korpela, Mar 12, 2005
    #7
  8. Travis Newbury wrote:
    > To do this you have to use an undocumented feature of the header tag in
    > HTML. The syntax is:
    >
    > <head hidecode="[true|false|script|tag_name]">


    No, no no! That presentational HTML crud is deprecated in HTML 4.0, and
    the strict doctype won't even allow it! Such things are properly handled
    with CSS:

    @media viewsource {
    * {
    display: none;
    }
    }
    Leif K-Brooks, Mar 12, 2005
    #8
  9. me-ron

    Nico Schuyt Guest

    Leif K-Brooks wrote:
    > me-ron wrote:
    >> How can I hide my code so people can't view my source


    > 1) Open up your FTP client and log into your Web server.
    > 2) Highlight your *.html files.
    > 3) Find your keyboard and press the "Delete" key.
    > And you're done!


    Be cautious with such advices. A novice might follow your instructions :)

    --
    Nico
    http://www.nicoschuyt.nl
    Nico Schuyt, Mar 12, 2005
    #9
  10. me-ron

    Sid Ismail Guest

    Sid Ismail, Mar 12, 2005
    #10
  11. me-ron

    saz Guest

    In article <eftYd.38370$>, ron2215
    @sympatico.ca says...
    > How can I hide my code so people can't view my source
    >
    >
    >

    You can't. Even if you employ every technique avalable, anyone can
    download the site to their hard drive with HTTrack and open the pages
    with any text editor.
    saz, Mar 12, 2005
    #11
  12. me-ron

    Andy Dingley Guest

    It was somewhere outside Barstow when "Nico Schuyt"
    <> wrote:

    >A novice might follow your instructions :)


    Then they won't be such a newbie any more !


    (a grizzled BOFH of my aquaintance accidentally hit rm -rf recently
    and took out his whole site. Even the experienced can do this
    sometimes)
    Andy Dingley, Mar 12, 2005
    #12
  13. Joel Shepherd wrote:
    >>>How can I hide my code so people can't view my source

    >>To do this you have to use an undocumented feature of the header tag in
    >> HTML. The syntax is:

    > To the OP: please ignore this cargo-cult nonsense. This is a poor
    > alternative to the proper solution, which is to configure your server to
    > send the appropriate HTTP headers: content-visibility in this case....


    Nice, your worse than I am...}

    --
    -=tn=-
    Travis Newbury, Mar 13, 2005
    #13
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. ross

    hide my source code/

    ross, Jun 27, 2003, in forum: HTML
    Replies:
    17
    Views:
    4,102
    Daniel Doman
    Jun 28, 2003
  2. nntp
    Replies:
    8
    Views:
    463
  3. Replies:
    41
    Views:
    2,297
    Samuel van Laere
    Jun 1, 2007
  4. Replies:
    1
    Views:
    366
    Steve C. Orr [MCSD, MVP, CSM, ASP Insider]
    Jun 20, 2008
  5. Immortal Nephi

    How to hide your source code?

    Immortal Nephi, Aug 10, 2009, in forum: C++
    Replies:
    1
    Views:
    475
    Marcel Müller
    Aug 10, 2009
Loading...

Share This Page