[thelist] protecting files on a website

.jeff jeff at members.evolt.org
Mon Nov 18 01:49:01 CST 2002


jennie,

><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> From: jennie :D
>
> I'm wondering how I can prevent visitors from
> downloading my .css, .js, etc... files. I've tried
> .htaccess, but I haven't been able to get it to work.
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><

start off by never putting them online.  that'll prevent everyone from
downloading them.

however, since these files are used for styling and scripting, i'm guessing
that's not really going to work for you.  you're probably hoping to find a
way to let the browser download it when your site is requested, but want to
keep prying eyes from viewing these files.  well, guess what?  you can't.
if the browser can see them, then prying eyes can see them in numerous
ways -- browser cache, using the view-source: protocol in the browser
window, using an http command tool, using scripting (like a bookmarklet) to
grab this data from the dom, etc., etc., etc.

no offense, but this is a fruitless journey.  give up before you get nasty
blisters on yoru feet for nothing.

.jeff

http://evolt.org/
jeff at members.evolt.org
http://members.evolt.org/jeff/




More information about the thelist mailing list