Forum Moderators: open
Just thought of a trick that may ward off at least most of the people..
Instead of simply blocking view source, perhaps instead you could have fake source window pop up so they think they are viewing the source.
I still feel like its a silly thing to do, but if your into that kind of sneaky stuff...
Doubt it would affect any experienced coder who is looking for a particular way that something on the page was done... and obviously it wouldn't work on anyone who is trying to swipe your layout.
But, if I ever do happen upon a page with this annoying trick, I'll be sure to think of you my friend.
When you view source you see nothing - unless you scroll down of course but how many think to do so?
It sounds really corny I know but it does catch you if you don't know
Now...
I would not put in a ton of empty spaces as this merely inflates the size of the file and thus increases load-times and bandwidth considerations. If anything, I might use a code compressor that takes out all the blank spaces and makes it hard to read, while it reduces the file size and load-times.
For an example, view-source on Google's homepage sometime, you'll see what I mean by hard to read.
Oh no, wait, don't do that, someone at Google might get upset you are viewing their source, omg!
:-)
The most effective thing you can do to confuse someone is to use the JavaScript scrambler thingy of which I am lacking any understandable words to describe at the moment IoI. It uses some simple string to make the code look random but browsers can still read it (and if you figure it out you can decode it yourself). I have encountered this only once ever and it was before I read about it...of course here at WebmasterWorld. :)
Either way in the end trying to protect clientside code will only go as far as you can outwit others to be honest. If you are trying sell code then you'll want to start playing with serverside stuff.
Also flash is clientside...and I'm sure there is a way to view the contents of a flash file in swf form? If not I'm sure there is a way to decode it but that is a much different medium (the technology itself) then I think you're talking about.
First of all, any code used to design a web page (such as html, java, et al) is Open source.
Please understand what this means,
it drives me nuts to hear people complaining about the possibility of copyright infringement or what-have-you when concerning a part of a medium which not only can not BE copyrighted but by its very definition HAS no copyright.
Even though the O.P.'s proposition to hide source code will most likely not work, the never-ending quest to hide code is a legitimate tactic. If for some reason you couldn't "view source" on a web site, would you still feel that it was "open source"? Would you think you could just call up the webmaster and ask for his/her files? You can certainly do that with open source works... not so with web sites.
The fact that people use other peoples' code all the time is what keeps me in the camp of NOT blocking source code... but by all means, if someone codes an entirely original site by hand, javascript and everything, why should they have to share it with you? And furthermore, if you think web sites MUST and SHOULD be open source, then what say you to a Flash-driven website? Should we call those webmasters up right now and demand to see their .fla files?
That is wrong, too, if you're in America. In the United States, everything is given a full copyright upon creation
Sorry I should have said license, not copyright.
My point is that you hold the copyright on any work you create (with exceptions such as "works for hire"), and you can then license it as you choose.
The only ones who would be fooled by any form of source hiding "trick" are those who are too dumb to look for it in the first place.
I understand where your coming from, but you'd be amazed. I have had requests from affiliates at a place I used to work. they actually asked me questions about how to get around source code blockers. It was a very common occurence.
Also I'd just like to say I've never blocked my source code myself. I agree its a ridiculous thing to do. It's like giving someone a book that has the words blocked out.
enough outta me...
Here's my problem with the scenario:
It's not like anybody woke up one morning and wrote some Web site code just as nicely as an author might type up a novel, mainly because it doesn't work like that. A novel is a story, I can live with the belief that a true writer can wake up one morning and concoct a story out of the blue. But no, I can't live with someone telling me they just invented a Web site without further ado, not even the basic knowledge of coding? With a site, the code is engine, not the car itself. You might can patent a particularly clever process, but other than that...?
But, that's just me.
Now... Copyright Law section 102
§ 102. Subject matter of copyright: In general26
(a) Copyright protection subsists, in accordance with this title, in original works of authorship fixed in any tangible medium of expression, now known or later developed, from which they can be perceived, reproduced, or otherwise communicated, either directly or with the aid of a machine or device. Works of authorship include the following categories:
(1) literary works;
(2) musical works, including any accompanying words;
(3) dramatic works, including any accompanying music;
(4) pantomimes and choreographic works;
(5) pictorial, graphic, and sculptural works;
(6) motion pictures and other audiovisual works;
(7) sound recordings; and
(8) architectural works.
(b) In no case does copyright protection for an original work of authorship extend to any idea, procedure, process, system, method of operation, concept, principle, or discovery, regardless of the form in which it is described, explained, illustrated, or embodied in such work.
-----------------------------------------------------
As far as I'm concerned, a web site falls under section (b), at least as far as the code goes.
This is not like writing a book, this is writing a program. It's hardly original at that, every piece of it, every sub-section and every script on a page existed long before we put it there.
It is just like they say: an idea, procedure, process, system, method of operation, concept, principle, or discovery, regardless of the form in which it is described, explained, illustrated, or embodied in such work.
Now pictures (if created by owner) and music (if owner composed it) and any movies (if owner filmed it), those belong to owner, those can and are protected by copyright law.
Here's the rest of the read:
[copyright.gov...]
As for me, if someone wants to cut a snippet of a script, I quite honestly don't care because most of my code is quite the original copy-n-paste anyhow.
Oh stop laughing, most folks either started that way themselves or they used Wysiwyg programs <- And that doesn't make it any better, either.
But... Does it validate? Is it compliant to w3 standards?
What if this person runs it through one of the w3's validators, makes the changes until the code is proper.
Why, they used the w3's validation formulas...
Does the code now belong to the w3 as well?
It's sure not original anymore ...
A painting can have a copyright, but the canvas does not, and neither does the frame.
A book's content is what is copyrit, but not the paper, nor the binding.
That's just my interpretation of it guys, I'm sorry I shouldn't have been flamey in my approach, but if guys with sites that get billions of visitors/month can't stop (and don't stop) anyone from viewing source, why should we?
It's hardly original at that, every piece of it, every sub-section and every script on a page existed long before we put it there.
Why not break it down further and say that every letter, digit, punctuation mark, etc. is used elsewhere therefore no written work anywhere is original?
Let me be blunt...
If you create an original work, copyright is your by right - that's basically the law across most of the planet. You may think the law is wrong but that does not make you right.
Let me be blunter...
You're spouting nonsensical piffle whilst dressing it up as some sort of philosophical argument.
Incidentally, every script, every piece of CSS, etc and all the text on my site is original - I don't cut and paste anything (except my own code).
Kaled.