SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Enthusiast
    Join Date
    Jul 2006
    Posts
    50
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Lightbulb Block View Source

    In the above site the view source is blocked.
    How is it possible ?

  2. #2
    CSS & JS/DOM Adept bronze trophy
    Join Date
    Mar 2005
    Location
    USA
    Posts
    5,482
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That's a Flash file, not a HTML page.
    We miss you, Dan Schulz.
    Learn CSS. | X/HTML Validator | CSS validator
    Dynamic Site Solutions
    Code for Firefox, Chrome, Safari, & Opera, then add fixes for IE, not vice versa.

  3. #3
    _ silver trophy ses5909's Avatar
    Join Date
    Jul 2003
    Location
    NoVa
    Posts
    5,466
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    this may help you:

    http://www.jguru.com/faq/view.jsp?EID=444156

    but remember... all someone has to do is disable JS. that is simply a work around and will slow down people in SOME browsers.
    Sara

  4. #4
    SitePoint Guru MikeBigg's Avatar
    Join Date
    Jun 2004
    Location
    Reading, UK
    Posts
    970
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nevermind.
    Last edited by MikeBigg; Nov 20, 2006 at 10:08.

  5. #5
    SitePoint Enthusiast
    Join Date
    Sep 2002
    Location
    Melbourne, Australia
    Posts
    82
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I don't think that there is any effective way to block the viewing of source, taking screenshots, etc. Only minimal knowlage is required to get around such measures. I'm sure for example that many people here have noticed the "view generated source" function in the web developer toolbar extention for firefox.
    sigy

  6. #6
    SitePoint Guru MikeBigg's Avatar
    Join Date
    Jun 2004
    Location
    Reading, UK
    Posts
    970
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You're right, Jixor. At the very least the html is in a file in the local file system.

    If someone is keen enough they can get at the source code, however, disabling the view source menu item may be enough to put off the casual or not so determined visitor.

    Mike

  7. #7
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,789
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    With Firefox/Greasemonkey and Opera you can insert a userscript into all web pages that adds a View Source link into the web page itself which will display the source the way that the browser currently sees it at the time of selecting the link. Very useful for debugging problems with pages where the content is updated from 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="^$">

  8. #8
    SitePoint Wizard HarryR's Avatar
    Join Date
    Dec 2004
    Location
    London, UK
    Posts
    1,376
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    There is a bug in Opera 8/9 which allows you to stop users of the browser to view source code.

    I reported this bug a few months back but haven't had any response about it and it wasn't fixed in 9.02.

    Basicly (on the server-side) just output character 0 where you want to stop the source from being viewed, anything below it won't be displayed in the built-in source viewer (due to presumptions by the string handling libraries in either QT or in Opera's code).

    But remember, this is a browser specific bug and doesn't work for Internet Explorer or Firefox (and I haven't tested it in WebKit/Safari).


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
  •