Forum Moderators: phranque

Message Too Old, No Replies

Secure the css code?

Is it possible in any way to hide the css code?

         

Bosse

12:43 pm on Jul 1, 2003 (gmt 0)



Hi y’all,

I'd like to hide my css file (Why? Long story…).
When you've got an asp app, you can put your mdb file outside the root, just so it's "untouchable" for outsiders. (f.x. c:\clients\yourdomain.com\db\mydatabase.mdb)
Is it possible to put the css file outside the root as well? If yes, how do I call it from the html page? (doesn't work with c:\clients\yourdomain.com\css\mystyle.css)
If not, can I put a js file outside the root? If yes, can I convert the css file to a js file? And how do I do to get the css to work on the html page when using a js file?

Or, if I refrase the question; Is it possible in any way to get a html page to use external css without the css code is avalible to wiev for the visitor?

/Bosse

edit_g

12:47 pm on Jul 1, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Is it possible in any way to get a html page to use external css without the css code is avalible to wiev for the visitor?

Anyone with half a brain can usually get past these blocks and any web designer with half a brain can usually recreate your CSS just by looking at the page.

What I am trying to say is that it simply isn't worth the bother.

<edit> welcome to webmasterworld btw! [webmasterworld.com...]

universalis

12:50 pm on Jul 1, 2003 (gmt 0)

10+ Year Member



Try: [webmasterworld.com...]

choster

3:14 pm on Jul 1, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You can hide the mdb file because the browser is not looking for it, your ASP application is looking for it. That is, your browser is not processing the ASP and the database and constructing a layout, it is calling the ASP, and the ASP pulls from the database and outputs HTML; the browser then processes the HTML to display the formatted data.

In contrast, the browser does process CSS files. When it creates a layout, it matches the HTML input against the styles defined in the CSS, so it requires both. The same is true of external Javascript files; the browser itself typically processes Javascript, rather than the server.