how to make html code not visible in firefox

Discussion in 'HTML' started by Jan PA1RQR, Dec 20, 2006.

  1. Jan PA1RQR

    Jan PA1RQR Guest

    I have made a homepage with a small javascript routine to suppress the
    visablility of the sourcecode when you press the right mousebutton, this is
    working in I.E.
    But in firefox the code is still visible.
    Q. How can I make the sourcecode not vissible when I press the right mouse
    Thanks for help. Jan (NL)
    Jan PA1RQR, Dec 20, 2006
    1. Advertisements

  2. You have a way to keep users from selecting View | Source on the browser
    menu? From turning off Javascript? From switching to another browser?
    How will you keep Firefox from responding to Ctrl-U?
    Harlan Messinger, Dec 20, 2006
    1. Advertisements

  3. Jan, the answer is very simple, you cannot, except by not putting on a
    server ;-)

    My advice, do not bother. Markup is not that precious. Copyright your
    content an be done with it. Basic observation: "The value of the markup
    is inversely proportion to author's desire to protect it"
    Jonathan N. Little, Dec 20, 2006
  4. Jan PA1RQR

    the red dot Guest

    what have you invented in regards to html that you need to hide?
    the red dot, Dec 20, 2006
  5. I doubt that it is possible, and even if it was, it could be bypassed quite
    easily. Except as an experiment to see if you can do it, I wouldn't
    bother. If the code is any good, it will get copied - nothing you can do
    besides not publishing it.

    Carolyn Marenger, Dec 20, 2006
  6. Jan PA1RQR

    Neredbojias Guest

    Do your home page in Flash, etc.
    Neredbojias, Dec 21, 2006
  7. Jan PA1RQR

    Vince Morgan Guest

    It takes about 20 mins to write a simple application that can make http
    requests and download the data as text.
    And, there is virtualy nothing you can do to prevent that.
    Vince Morgan
    Vince Morgan, Dec 21, 2006
  8. Jan PA1RQR

    Vince Morgan Guest

    I mean markup, rather than "data".
    Vince Morgan, Dec 21, 2006
  9. Much less time if you use a nice programming language, and don't mind

    Python 2.5 (r25:51918, Sep 19 2006, 08:49:13)
    [GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin
    Type "help", "copyright", "credits" or "license" for more information. '<html><head>...'
    Leif K-Brooks, Dec 21, 2006
  10. Jan PA1RQR

    Ed Seedhouse Guest

    Considering that you must send the actual html source for the page to be
    displayed at all, and that the display device is normally a fairly high
    powered computer, the idea strikes me as both futile and silly.
    Ed Seedhouse, Dec 21, 2006
  11. I wouldn't even go that far. I would just use the File->Save As to save it
    to my drive, then an editor to read it. I can then copy and paste any
    links that I want and copy them too. :)

    Carolyn Marenger, Dec 21, 2006
  12. Jan PA1RQR

    Arjen Guest

    Jan PA1RQR schreef:
    First of all i wouldn't recommend hiding your source code.

    But if you really insist you can make it more difficult. You could use
    an ajax request to fill the page. That way the final source code wont
    show up with view source. There are easy methodes of viewing the
    generated source but imho not many 'simple visitors' know how. Offcourse
    not all browsers are compatible (many are dough)

    Arjen, Dec 21, 2006
  13. Jan PA1RQR

    dorayme Guest

    It would be like company secrets and would doubtless benefit some
    of those who did it. Not sure the description of silly or futile
    is apt.

    I would say it is a bad idea generally for similar reasons to
    those that make it a good idea to have open source programs. But
    there are arguments both ways on this issue. It may be that
    companies would put more effort into development if their
    operations were not quite so open.
    dorayme, Dec 21, 2006
  14. Jan PA1RQR

    dorayme Guest

    Is this getting the source markup?
    dorayme, Dec 21, 2006
  15. Jan PA1RQR

    Ben C Guest

    It's often the opposite though. There are a lot of companies whose
    "mission critical" products you wouldn't dream of buying if you'd seen
    the ball of mud source code they were compiled from.
    Ben C, Dec 21, 2006
  16. Jan PA1RQR

    dorayme Guest

    Yes, this is a point!

    Slightly similar but not as bad: I'd hate to let a client see my
    duffing about making their website, they would surely lose
    dorayme, Dec 21, 2006
  17. Jan PA1RQR

    Jeff Bowman Guest

    Heck, you can do it with a single entry at a telnet prompt :)
    Jeff Bowman, Dec 22, 2006
  18. Jan PA1RQR

    Ed Seedhouse Guest

    It is clearly futile since you can't send someone unencrypted plain text
    and expect that they won't be able to look at it. And you must
    necessarily do so if you want someone to look at your web page. Silly is
    a value judgement I admit, but I stand by it. I think it's silly to
    want something that is self contradictory.
    Ed Seedhouse, Dec 22, 2006
  19. And of course this means the website won't be available to people who
    don't have Javascript turned on.
    Harlan Messinger, Dec 22, 2006
  20. Jan PA1RQR

    Floortje Guest

    Harlan Messinger schreef:
    Yup and images wont get displayed if you turn hem of as well :)

    Anyway .. that's easily avoided with some server side scripting.

    check if ajax is supported if no session is registered with default no.
    Then let the server descide to display the original source code or use
    an ajax request

    // shows the content .. redy to be requested by ajax call
    // shows complete page

    offcourse anyone can still view the source by disabling javascript (that
    problem allready existed with op) and by requesting the ajaxrequest.php
    or viewing thx request headers but normal viewers on a site wont go that

    Floortje, Dec 22, 2006
    1. Advertisements

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.