I found this site in search for a way to protect your CSS http:// maratz. com/blog/archives/2004/07/24/script-theft/ I have been trying to figure out how he did this. I have never seen it done and have searched high and low for a way to impliment it. There is no way that I can see to get his CSS. I think it's a great way to protect your design. Does anyone know all the steps to make this work?
It seems like a really bad idea to me: 1. Anyone with the referrer header blanked or disabled gets un-styled content 2. He's using server side code (PHP) not JavaScript - if you used JavaScript those with it disabled would see un-styled content 3. It doesn't prevent anyone stealing your CSS, only hot-linking it, and people hot-linking CSS is rare anyway, so far as I know.
That doesn't seem like a big deal, they still will see the content. Same response as above. Try to view his CSS. I really don't think you can. If you try you only get his page that says "thank you for being interested in my work", with a link that brings you to the URL in my original post. It's funny, because it seems most people have the same opinions as you, but this guy really has done something to protect his work. I'm sure a script kitty would be able to get the CSS and maybe preventing people from viewing your CSS may actually bring those types of people to your site to break your "code". I've seen people trying to hide their html with encryption software (easy to decrypt). Hotlinking would be easiely tracable, and I agree that wouldn't be a concern, but please take another look at how this guy protected his work. disclaimer: I am interested in how he did it, not how to steal it.
Techniques like these are a waste of time (your time, that is). Hit File > Save As in your browser and get all his stylesheets and JS files. The only way to prevent people from getting any of this stuff is not to publish it One thing you can do, though, to make it harder for somebody to use your stylesheets and scripts - you can obfuscation tools on your files before publishing them. These tools change your source so that it's harder to understand what it does for a human. For example, it will change this function rotateImage(img) { // get next image img.src = imgarr.nextImage(); } into this function f1(p1){img.src=v1.f2();} , making it smaller to serve and harder to understand. J.D.
His CSS: [ Removed by myself ] Edit: I posted this code to prove a point, I will remove it shortly, before I get a DMCA of the guy.
I don't think you're totally wasting your time, but I think J.D's advice of making the code less human readable is the better option than trying to restrict access.