Page 1 of 2 12 Last
  • Jump to page:
    #1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2001
    Posts
    8
    Rep Power
    0
    even though you can't disable view source, there MUST be away to hide html code. i don't care if there is any program to crack it just plz give me the code, oh, and plz explain it to me since i'm not so good at putting html code in.
  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2000
    Location
    Melbourne, Australia
    Posts
    5
    Rep Power
    0
    There is no way to hide HTML code. Once it is on the user's browser, they always have access to it.
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2001
    Posts
    1
    Rep Power
    0

    The Code


    Put the below Code below the </head> in your page.. Thats ALL......

    <script>
    var message='The Source code is Protected by Copyright Laws. Your Compnay Inc.';
    var options="toolbar=0,status=0,menubar=0,scrollbars=1," + "resizable=1,width=500,height=400";

    function On_Click(key)
    {
    if (document.all)
    {
    if (event.button == 2)
    {
    alert('The Source code is Protected by Copyright Laws. Your Company Inc.');
    return false;
    }
    }
    if (document.layers)
    {
    if (key.which == 3) {
    alert('The Source code is Protected by Copyright Laws. Your Company Inc.');
    return false;
    }
    }
    }
    if (document.layers)
    {
    document.captureEvents(Event.MOUSEDOWN);
    }
    document.onmousedown=On_Click;
    </script>

    Comments on this post

    • jbot disagrees : using JS to break the user's browser is not your right. it's also kinda stupid, because i can use JS to get round it anyway
  6. #4
  7. Resident DJ
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2001
    Posts
    283
    Rep Power
    18
    I hate people that disable right click. damn script kiddies. I use my right click more than most people, (print, refresh, back)

    on sites that disable right click, i usually will get their source code (either by view source or <a href="view-source:http://site.com">view</a>) and will post in on a message board.

    yeah I know sounds immature. The exact HTML code and way it is written can be considered copyrighted, but if someone sees something interesting that is a valid HTML tag and want to check out to see how it was done - all the power to them.

    Comments on this post

    • medialint agrees
    • SimonGreenhill agrees
    • jmeeter agrees
  8. #5
  9. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2000
    Location
    Melbourne, Australia
    Posts
    5
    Rep Power
    0
    Of course if you turn off Javascript in your browser you can still view the source in the normal way.

    Comments on this post

    • jbot agrees : too right ...
  10. #6
  11. No Profile Picture
    Senior Meddler
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2000
    Location
    NY NY USA
    Posts
    142
    Rep Power
    18
    ...and as id_machine has mentioned elsewhere, it's a bit hypocritical to be asking others for the code you want that will hide your own code from others.

    If it really is that important to you that you have to ask this question several times, you'd do better to learn how to do it on your own. That way, if you figure out some foolproof method of doing it, you can keep it from the rest of us.

    ,
    bob

    (I'd suggest learning JSP. I've seen some methods with it that could almost fool folks into thinking the source was hidden.)

    Comments on this post

    • SimonGreenhill agrees
    --
    Bob Boyle
    boyleb@rappdigital.com
    www.rappdigital.com
  12. #7
  13. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2001
    Posts
    8
    Rep Power
    0
    all i wanna do is protect my site from leechers
  14. #8
  15. No Profile Picture
    Senior Meddler
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2000
    Location
    NY NY USA
    Posts
    142
    Rep Power
    18
    SubKamran, I hate to be harsh, but the truth often is.

    #1) Outside of you writing a Java applet to display the content of your site or figuring out some way to post it via some streaming media format that doesn't get cached, your pages and your images are going to get cached. If you disable any browser-based means of snagging this stuff, it'll be live in each user's cache directory. Even if you use a meta tag to expire that page, if someone is determined enough they can probably use a file recovery program to pull the data from those sectors of their disk before it gets written over.

    #2) (This may be particularly harsh, but) with millions of page authors out there and billions of web pages, why would someone want to steal your stuff? If it's that valuable, posting it on the web is a bad idea in the first place. And if it is that hot, you shouldn't need to be asking this question since in order for it to be that hot you'd have to have better answers than any of us here.

    #3) Now, given that there are millions of authors with billions of pages out there, if someone did want to use your code you should wear that as a badge of honor. Your stuff is good enough to learn from ... your stuff is good enough to "steal".

    #4) Finally, if you have ever learned from looking at someone else's source, you owe it to the folks coming up behind you to offer the same service. That's the way it has been since day one of the web--in fact, in 1993 that was about the only way you could learn how to code -- and IMO, that's the way it should stay.

    The best protection you can give your code is like rickeybrown said -- copyright it. For all that's worth. If you're worried about images, then get Photoshop and whatever you need to embed digital watermarks in your images and do that as well. That might actually give you better protection than copyrighting plain text, since Pshop can stop others from modifying your images.

    Otherwise, you gotta learn to love it or ignore it ... it's not going away.


    bob

    Comments on this post

    • medialint agrees
  16. #9
  17. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2004
    Location
    Houston, TX
    Posts
    154
    Rep Power
    14

    Regarding disabling view source code


    I know this is a response to an old thread but I see a lot of the same responses to this type of question and I want to make a point.

    I design sites for potential clients. If I do a demo for a potential client, I don't want them to obtain the code, use it and then get into a legal battle with them over copyright issues. However, I do not simply want to screenshot the page either, as I believe the client will want to navigate the site and get the feel for it. And in that aspect, finding methods to protect yourself and prevent any legal issues in the future, methods of disabling source code should be used.

    Let me note, any disabling I do is not permanent. Once an agreement has been reached, then they are free to do whatever they want. On sites I design for personal/business use, I always allow visitors to view the source code if that site is not being used as a sample to what a client wants.

    Just wanted to point that out for future references.

    Tim Trice
  18. #10
  19. "I'm dulled by excess..."
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2004
    Location
    London, England
    Posts
    238
    Rep Power
    15
    I've no intention of having a jibe at anybody, but I felt like chipping in my two cents on this matter.

    Website designers and programmers these days are blessed with programs and languages that only 8 years ago, people would never had imagined were possible. With so many people supporting Firefox and other such 'open-source' projects, it's becoming increasingly more common to share each others code and design ideas. That's how it all works; we look at other people's code and their designs to get ideas and to help us understand it all. Too many people these days are too damn frugal and stingy. I'm 100% certain that those who do disable right clicking and the hiding of their code have at some point looked at the code of someone else's website or program. If everybody tried to stop other web designers and programmers viewing their work, I very much doubt that the internet would be what it is today.

    And the ironic thing, I suppose, is that posts like this requesting codes written by other people to hide their own codes, actually exist. Oh, it just makes me smile.
  20. #11
  21. Contributing User
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Dec 2003
    Posts
    2,343
    Rep Power
    582
    Sorry, Tim. Can't be done...

    It's gotta be screenshot, or just trust your client.
  22. #12
  23. a rootin', tootin', shootin'
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Feb 2004
    Location
    location.href="hame"
    Posts
    3,464
    Rep Power
    104
    Originally Posted by amassedaura
    If everybody tried to stop other web designers and programmers viewing their work, I very much doubt that the internet would be what it is today.
    no, that's a fallacy. developers would still be able to write their own code, figuring out how to do stuff as they went along. also, code-lifting is not the only way to learn - there are things called books, you know, which are meant to inculcate you anything from the very basics to the expert. being innovative comes down to your own ability and imagination.

    yes, sometimes viewing a site's source is something we've all done from time to time, but arguing that the whole internet of development has depended on this is purely bogus. nonetheless, you're somewhat correct, that coding websites should be open to everyone and not be some sort of arcane art which only an elite are invited to participate in.


    Originally Posted by amassedaura
    The ironic thing is that posts requesting codes written by other people to hide their own codes, actually exist.
    indeedy. it's kinda like the pot calling the kettle black, innit!
    while ((code="javascript").substring(0,4)=="java") code!="java"

    while ((gratitude="thanks in advance").substring(0,6)=="thanks") gratitude!="thanks"
  24. #13
  25. No Profile Picture
    Contributing User
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Nov 2001
    Location
    North West UK
    Posts
    1,147
    Rep Power
    400
    With more and more dynamic websites, it becomes less of an issue surely. The smarts aren't in the HTML that a viewer can see so much as in the server-side scripting that generates the HTML, and that can be protected.

    If you really have to make the HTML incomprehensible to anybody doing a view source, you can always make creative use of javascript's document.write.

    Comments on this post

    • jbot disagrees : and thereby make your site inaccessible which is illegal for commercial sites in the UK
    9 out of 10 PHP problems can be resolved by setting
    PHP Code:
    error_reporting(E_ALL);
    ini_set('display_errors'1); 
    php -l <filename> will identify 9 out of the remaining 10 problems
    Remember, the command line is your friend

    Development Projects:
    PHPExcel
    PHPPowerPoint
  26. #14
  27. No Profile Picture
    Contributing User
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Nov 2001
    Location
    North West UK
    Posts
    1,147
    Rep Power
    400
    Originally Posted by jbot
    jbot disagrees: and thereby make your site inaccessible which is illegal for commercial sites in the UK
    Don't get me wrong, I'm not advocating hiding HTML markup... I don't believe it can really be done effectively, and I wouldn't do it myself.

    However, it doesn't make the site inaccessible.... the page can still be rendered in a browser; and why is it illegal???
    9 out of 10 PHP problems can be resolved by setting
    PHP Code:
    error_reporting(E_ALL);
    ini_set('display_errors'1); 
    php -l <filename> will identify 9 out of the remaining 10 problems
    Remember, the command line is your friend

    Development Projects:
    PHPExcel
    PHPPowerPoint
  28. #15
  29. a rootin', tootin', shootin'
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Feb 2004
    Location
    location.href="hame"
    Posts
    3,464
    Rep Power
    104
    Originally Posted by Mark Baker
    Don't get me wrong, I'm not advocating hiding HTML markup... I don't believe it can really be done effectively, and I wouldn't do it myself.

    However, it doesn't make the site inaccessible.... the page can still be rendered in a browser; and why is it illegal???
    if you use JS to render your pages, then you're making them inaccessible to people who use screen-readers, braille browsers, etc, which have no JS support. it's illegal because it contravenes the UK Disability and Discrimination Act (DDA) which states that websites, intranets, applications, must not discriminate on the users ability to use the site.

    Comments on this post

    • kk5st agrees : Some US courts hold websites to Americans with Disabilities Act standards
    while ((code="javascript").substring(0,4)=="java") code!="java"

    while ((gratitude="thanks in advance").substring(0,6)=="thanks") gratitude!="thanks"
Page 1 of 2 12 Last
  • Jump to page:

IMN logo majestic logo threadwatch logo seochat tools logo