xcoderx Posted July 7, 2009 Share Posted July 7, 2009 Need some idea hiding css source so that people cant steal it, anyone know how to with php? Quote Link to comment Share on other sites More sharing options...
Adika Posted July 7, 2009 Share Posted July 7, 2009 Hiding css source - not possible. What you can maybe do is to scramble it, so that it would be much harder to read. But for how to do it, google a little. :-) Quote Link to comment Share on other sites More sharing options...
xcoderx Posted July 7, 2009 Author Share Posted July 7, 2009 U mean with java? Quote Link to comment Share on other sites More sharing options...
Psycho Posted July 7, 2009 Share Posted July 7, 2009 U mean with java? Java != JavaScript, they are two completely different technologies. Yes, you can use Javascript to make it more difficult for someone to get the code, but... As Adika stated there is no way to "hide" CSS code. The CSS has to be read by the browser which means it is first downloaded to the client PC. You could use obfuscation to make it hard to read, use javascript to prevent user from "easily" seeing the CSS references in the HTML, and other hacks. But, all you will accomplish is pissing off many of your users without providing any real security. Because those hacks will also prevent users from using simple functions such as printing via right-click. And, anyone with the abilty to know how to repurpose someone else's CSS would be able to find the CSS file in their cache and find a way to un-obfuscate the code. Quote Link to comment Share on other sites More sharing options...
JonnoTheDev Posted July 7, 2009 Share Posted July 7, 2009 pointless - will add overhead and why would anyone want it? you will never hide it from an experienced web user. Quote Link to comment Share on other sites More sharing options...
xcoderx Posted July 7, 2009 Author Share Posted July 7, 2009 Agreed but sometime back i made a template fa my xhtml wap enable site and now alot of people using it by stealing my design. Quote Link to comment Share on other sites More sharing options...
JonnoTheDev Posted July 7, 2009 Share Posted July 7, 2009 Agreed but sometime back i made a template fa my xhtml wap enable site and now alot of people using it by stealing my design. Welcome to the Internet. Use a php file for CSS definition and encrypt it using ioncube. Personally though I wouldn't be bothered. Quote Link to comment Share on other sites More sharing options...
Psycho Posted July 7, 2009 Share Posted July 7, 2009 Agreed but sometime back i made a template fa my xhtml wap enable site and now alot of people using it by stealing my design. Welcome to the Internet. Use a php file for CSS definition and encrypt it using ioncube. Personally though I wouldn't be bothered. ioncube is for obfuscating PHP, not CSS. Using obfuscated PHP to create the CSS is pointless for what the OP wants as the souce code would be obfuscated but the rendered CSS that is sent to the browser wouldn't be. A littel googling turned up a few products that may be able to obfuscate CSS, but they don't exactly look to be top-of-the-line outfits, or at least none that I would trust the integrity of my code to. I agree, it would just be a PITA to try and obfuscate CSS. Quote Link to comment Share on other sites More sharing options...
seventheyejosh Posted July 8, 2009 Share Posted July 8, 2009 Is it just me or has this post moved like 9 times today ??? Quote Link to comment 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.