| 9:57 am on Dec 6, 2001 (gmt 0)|
nope, look in your browser cache, you'll find lots of css and js files, the browser needs to retreive them.
| 10:46 am on Dec 6, 2001 (gmt 0)|
I think it should work:
create css & js files as asp files with following content:
if Request.ServerVariables("HTTP_REFERER") <> "" then
...real file content goes here...
set asp handler for .css and .js extensions in IIS admin
now if someone requests a file without referer (e.g. he typed it in browser url field) he'll got a empty page
surely someone still could get page content from browser cache after normal request
| 3:11 pm on Dec 6, 2001 (gmt 0)|
What if you dant have asp?
So how do people protect their online databases from being downloaded?
| 3:18 pm on Dec 6, 2001 (gmt 0)|
Some users can turn off referer in their browser requests, e.g. Opera. And there are 3rd party utilities that strip from IE, etc, so those users won't get pages displayed correctly.
First someone would have to know the name of the database. But even if they did, you can place a database above the root. Scripts running on the server can access it, but there's no way to directly access it.
| 10:44 am on Dec 7, 2001 (gmt 0)|
knighty: you could create same script using any other server side scripting language
bobriggs: I agree with you; it's not a very smart solution...
| 12:21 pm on Dec 7, 2001 (gmt 0)|
OK thanks guys,
I thought there might be some little thing like modifying .htaccess but guess not eh?
| 12:37 pm on Dec 7, 2001 (gmt 0)|
To some extent it could be done with mod_rewrite - in the same way that you can protect images from being used within other sites... but as smalltime says - the files will be in the browser cache -- may stop some though.
I haven't tried it and there maybe other unpleasant side effects.
Heres the info from the previous post.... if you try it let me know how it goes :)
| 10:02 am on Dec 8, 2001 (gmt 0)|
By the way, you could set 'expires' field of HTTP response to past. So I think browser wouldn't store CSS of JS locally, but will re-request that resource each time visitor accesses web page.