Protect Your CSS File From Copycats

Even though the web was originally create to be open, times have changed and people want to keep the behind the scenes code just that, behind the scenes. Nice One Studios has a great article on how you can protect your CSS files from copycats. This method could also be easily implemented for other file formats like JavaScript.

This method is not bulletproof, as one could easily get your CSS file from the browser cache; but it will make it a little bit more difficult for the casual people looking to steal your code.

If you enjoyed this post, please consider to leave a comment or subscribe to the feed and get future articles delivered to your feed reader.

Comments

I don’t think “casual” people try to steal somebody else’s code :-)
And this is an awfully bad method of protecting CSS files.

Consider this:

Cookies disabled && session.use_trans_id enabled: all links have an ugly ?PHPSESSID appended to them

Cookies disabled && session.use_trans_id disabled: no CSS.

And using mod_rewrite where simple

ForceType application/x-httpd-php

would work just fine is just .. strange.

User can see CSS in browser cache, in firebug (for example), or just save page to disk - css will be there too.

Sorry, the comment form is closed at this time.