Dennis Posted September 22, 2003 Share Posted September 22, 2003 Hi, Does anyone know how to protect your linked CSS file from being downloaded? Quote Link to comment Share on other sites More sharing options...
surefire Posted September 22, 2003 Share Posted September 22, 2003 I myself have wondered the same question... but in thinking it through, I doubt it seriously. CSS is interpreted by the browser. So just like images, other digital media, html, and javascript... if the browser can interpret it... it's accessible. I've seen one case where the actual file was moved behind several links... so it was more work. I've also seen pages that have been run through some sort of obfuscation code to render a bunch of javascript that is tough to read. None of these are foolproof. Maybe someone else has a better solution. But in the end... if you don't want anyone to ever see it, then don't put it on the web. You may not like that answer but it's generally true. Quote Link to comment Share on other sites More sharing options...
Dennis Posted September 22, 2003 Author Share Posted September 22, 2003 if you don't want anyone to ever see it, then don't put it on the web Lolz, sad but true, like the best way to secure your computer is to pull off the your net connection, AC power and lock it in a bank vault. Guess when people are determined enuff, they can break thru whatever locks and security u can throw at them..... Quote Link to comment Share on other sites More sharing options...
Deverill Posted September 23, 2003 Share Posted September 23, 2003 Depending on the effects you wish the CSS to create you may be able to redo it in a server-interpreted way that only sends the results to the browser. For instance, I use a PHP script that tells me when Googlebot hits my sites. Google, nor the visitors, can read that because the server does the work and sends the browser nothing that can be read. Quote Link to comment Share on other sites More sharing options...
thewordlist Posted October 19, 2003 Share Posted October 19, 2003 Hello! Under the site management heading in the control panel, you should find a link to the hotlink control. Add your URL to the "URLs to Allow Access To" box, then add the .css extension to the list of extionsions to allow. Also add a URL to which you wish to redirect the user attempting to access your protected files. I have the following hotlink-protected: jpg,jpeg,gif,png,bmp,js,css (this list, by the way, is exactly copied and pasted from the extensions to allow box). This works very well. Try to click on the following link to one of my css pages. Also try pasting the address in the address bar. http://www.thewordlist.com/index.css Rock Sign Quote Link to comment Share on other sites More sharing options...
vendlus Posted October 19, 2003 Share Posted October 19, 2003 Nice. Thumbs Up Quote Link to comment Share on other sites More sharing options...
natimage Posted October 20, 2003 Share Posted October 20, 2003 Hello! Under the site management heading in the control panel, you should find a link to the hotlink control. Add your URL to the "URLs to Allow Access To" box, then add the .css extension to the list of extionsions to allow. Also add a URL to which you wish to redirect the user attempting to access your protected files. I have the following hotlink-protected: jpg,jpeg,gif,png,bmp,js,css (this list, by the way, is exactly copied and pasted from the extensions to allow box). This works very well. Try to click on the following link to one of my css pages. Also try pasting the address in the address bar. Just an FYI...This stops people from linking to the file, or directly calling the file in the address bar, but it does not stop people from "getting" anything. Whenever your page opens in a browser, all your images and your CSS files go into the computer's "Temporary Files" folder. Another way to get all the files for a page is to simply go to "Save Page As..." in the File menu and it's all there. There may be ways, some complicated and some simple, to "hide" things from people who would try to steal your files, but there is normally nothing you can do if someone is determined to steal something from your website. Quote Link to comment Share on other sites More sharing options...
thewordlist Posted October 21, 2003 Share Posted October 21, 2003 Thanks for the FYI! I hadn't thought of that. Quote Link to comment Share on other sites More sharing options...
TCH-JimE Posted October 21, 2003 Share Posted October 21, 2003 Hi, I was about to say, I just downloaded that file without a problem. There is no correct way of stopping the CSS from being downloaded period. You could use alot of Server side technology to do it, but at the end of the day, a webmaster only needs about 10 minutes to get past it Jim 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.