SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Thread: hiding code?

Hybrid View

  1. #1
    SitePoint Addict blizzman24's Avatar
    Join Date
    Jul 2004
    Location
    Texas
    Posts
    345
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    hiding code?

    how do you hide your code from being seen when they view source? I've seen people use frames, but I have no idea how they work... maybe someone could explain?

  2. #2
    SitePoint Evangelist gollux's Avatar
    Join Date
    Feb 2005
    Location
    Oregon, USA
    Posts
    414
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Beavis: heh hehhh heh; hehh ehh

    Me: How'd ya'll like to buy the Brooklyn Bridge, see it's got all this traffic and you will get really rich charging everyone toll for crossing over it.

    One of the most over-asked questions on just about every forum I've ever been on that discusses creating web pages. Let's just say that you can try.

    There are javascript systems that serve up the page as an encoded string that gets decoded and written when the page gets loaded, it's probably your best bet. Besides the overhead in rendering such a thing, turning off javascript gives blank pages (which when source is viewed, allow you full access to the javascript source) and developers have this thing available (View Generated Source) that probably totally bypasses this. I've cracked it using a simple search and replace which takes 5-15 minutes.

    Frames probably don't do much, as Firefox has a view frame source feature which allows you to view each panel's source html.

    And it all gets saved to a browser cache which is directly viewable with ListXP.

    Don't annoy me with right click disabling, there's this thing called quick java, it's not even a funny joke anymore.

    Most of the time what people are trying to hide, ususally is an embarassement anyway.
    Last edited by gollux; Jan 30, 2007 at 01:08.
    Released under the Fiasco Labs Digital Damnation Copywright,
    it's yours to make whatever the 7734 you want with it.

    (c) 2005 Fiasco Labs All Wrongs Reserved

  3. #3
    SitePoint Wizard bronze trophy Tailslide's Avatar
    Join Date
    Feb 2006
    Location
    Bedford, UK
    Posts
    1,687
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ... so in summary: you can't hide it.
    Little Blue Plane Web Design
    Blood, Sweat & Rust - A Land Rover restoration project

  4. #4
    SitePoint Addict
    Join Date
    Apr 2001
    Location
    Devon, UK
    Posts
    333
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hiding HTML or CSS code is futile - if someone really, really wants to see your code then they will do it, no matter how hard you try to prevent it.

    There is something to be said for JavaScript compression and obfuscation: it will benefit the user since the download is smaller. But there are still ways to return it to a readable source.

    Code hiding also risks your search engine ranking. If Google can't read your page (because it's encoded in JS or whatever), then it can't index it.

    Finally, why spend time and effort doing it? It's highly unlikely that your code will be doing anything that hasn't been done before. Also, most decent developers will be able to replicate your functionality far quicker than it would take them to reverse-engineer your source. It's not worth worrying about!

  5. #5
    Robert Wellock silver trophybronze trophy xhtmlcoder's Avatar
    Join Date
    Apr 2002
    Location
    A Maze of Twisty Little Passages
    Posts
    6,316
    Mentioned
    60 Post(s)
    Tagged
    0 Thread(s)
    The answer is don't put it on the internet.


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
  •