phppaper Posted March 21, 2008 Share Posted March 21, 2008 Is it possible to encypt a .css file or hide the code of a .css file from the use?? Quote Link to comment https://forums.phpfreaks.com/topic/97234-encypt-a-css/ Share on other sites More sharing options...
rhodesa Posted March 21, 2008 Share Posted March 21, 2008 not that i'm aware of. the browser needs it to generate the page, and if the browser can see it, then the user can see it (one way or another). more importantly, why would you want to hide the CSS file? Quote Link to comment https://forums.phpfreaks.com/topic/97234-encypt-a-css/#findComment-497548 Share on other sites More sharing options...
aximbigfan Posted March 21, 2008 Share Posted March 21, 2008 Not unless you do something complex. Why do you want to encrypt it? No body is going to steal it. It makes about as much sense as tying to encrypt HTML. Besides, if someone really wants your css, changes are that they will figure out a way of decrypting it. Chris Quote Link to comment https://forums.phpfreaks.com/topic/97234-encypt-a-css/#findComment-497558 Share on other sites More sharing options...
haku Posted March 21, 2008 Share Posted March 21, 2008 People do steal sites sometimes. They rip the CSS off of a persons site and then add their own content. Quote Link to comment https://forums.phpfreaks.com/topic/97234-encypt-a-css/#findComment-497746 Share on other sites More sharing options...
dbrimlow Posted March 22, 2008 Share Posted March 22, 2008 Anything that gets displayed by a browser can be looked at and copied ... it is why it is called "browser side". You shouldn't worry about people stealing your css or html. a: I personally consider it flattering. b. I never leave my css or html alone for more than a few months anyway. There is always a way to improve it, new and better techniques are always coming out, converting pages from transition doctypes to strict and making older markup semantic, and of course, 99% of every web page can always be optimized for true accessibility (which is real a bitch to do!). Quote Link to comment https://forums.phpfreaks.com/topic/97234-encypt-a-css/#findComment-498345 Share on other sites More sharing options...
phppaper Posted March 23, 2008 Author Share Posted March 23, 2008 I think people will steal it because they could take the whole template and make a new site to save a lot of time specially when your CSS is with all the div nicely done. Quote Link to comment https://forums.phpfreaks.com/topic/97234-encypt-a-css/#findComment-498639 Share on other sites More sharing options...
haku Posted March 23, 2008 Share Posted March 23, 2008 It can and will happen. You could maybe try this: http://www.htmlguardian.org/protect-css.html I just found it by googling. But at a glance, I dont like it - it seems to require Javascript to be enabled for your site to work. Quote Link to comment https://forums.phpfreaks.com/topic/97234-encypt-a-css/#findComment-498650 Share on other sites More sharing options...
bronzemonkey Posted March 23, 2008 Share Posted March 23, 2008 You can't protect your html, css, or javascript code. Not even people with far larger, far better, far more well known, and far more technically impressive sites can protect their code. Part of how people learn front-end web development is by looking at the source, copying it, modifying it, playing around with it, etc. It's inevitable. But that is different from theft. If someone completely rips off all your code and just makes absolutely minor alterations, it will most likely be found out and there are places like this - www.pirated-sites.com/ - that try to name and shame. Plus, these pirates are often so poor at pirating that they will leave your email address (or something equally stupid) lying around in the code. It is also a good idea to comment your files to include your name and a copyright statement (saying "don't steal my code!"), as well as have one in the footer of your website, just to try and dissuade possible theft. Quote Link to comment https://forums.phpfreaks.com/topic/97234-encypt-a-css/#findComment-498710 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.