Register  |  Login

Question Details    

   Question

Time: 17:17 - Aug 30, 2006     Asked by: multani.sarbjit      Status: Answered      Points: 125   

Hiding css and javascript files

HI ,

Is there anyway to hide the css and js files of project so that user can't view it in the browser if somehow user came to know the path of these files of project?. In otherwords can we encrypt these files ?

Any suggestion please!!

Thanks in advance

Regards,
Sarbjit

Ask a New Question

Become a Quomon Expert

Current Categories

 

Other Questions Needing Answers


   

Answer Discussion
Answer Discussion
Answer Summaries
Answer Summary
 
Hi Sarbjit,

You can't prevent people from downloading the files, but you can encrypt them or obfuscate them if you want it to be difficult for people to see what you've programmed.
I don't know any free scripts to do this, but here are a few links to shareware (they have trial periods) that might be what you're looking for.
http://www.topshareware.com/Advanced-HTM...
http://www.protware.com/default.htm
http://www.exefind.com/encrypt-php/

Let me know if that was what you were looking for.
theDude

Expert:

theDude

Date:

Aug 30, 2006

Time:

19:27

 

Votes: Good (0) | Bad (0)
Login to rate this answer

Thanks theDude,

You got the right things but I want to do in scripting the encryption of these files.

Regards,
Sarbjit

Expert:

multani.sarbjit

Date:

Aug 31, 2006

Time:

06:19

 

Votes: Good (0) | Bad (0)
Login to rate this answer

Maybe the JSLinker of the Dojo project might be the thing you are looking for: it allows you to transfowm your code into an AST which is faster to execute and also obfuscates the code you've written. For CSS I have no idea at all because a good DOM-Inspector can be used to analyze the properties...

http://snyke.net/blog/2006/09/02/js-link...

Regards,
Snyke

Expert:

Snyke

Date:

Sep 03, 2006

Time:

15:23

 

Votes: Good (0) | Bad (0)
Login to rate this answer

Hi All,
I was looking at your comments and have the same problem. I use ASP programming and have my JS files in a seperate folder to hide them but when I look at the source code in the browser it obviously displays the path to this folder in my <Script> tag. If I select and copy this path from the displayed source file and paste it into the address bar accordingly it allows me to download the file, so my question would be, is there anyway to password protect this folder to prevent download?

Let it be said also that my JS is very basic, (image over buttons) so it is not important but I would like to find a way to hide these files incase I ever have to deal with sensitive data using JS. I can do this with VB anyway, (run on server), but I would like to prevent as much server lag as possible.

Thanks for your time people.

regards,
James.

Expert:

webkungfu

Date:

Jun 22, 2008

Time:

06:04

 

Votes: Good (0) | Bad (0)
Login to rate this answer

James,

Don't know if you have already thought about it this way: You can indeed password protect the folder with you script files, to prevent download, but they wouldn't be much good then, since the browser wouldn't be able to see them either. Anything that runs client-side will have to be visible to the client (browser, user, whatever). You can make things difficult for the user by only serving the file if the referer is your web page, but anyone who would have an interest in seeing your secret js-file with sensitive data, will also be clever enough to overcome any kind of obstacle you may present.

If you want to hide script or data, the answer is to run it on the server and never serve it to any client.

Hope it makes sense!
Jakob

Expert:

jgivoni

Date:

Jul 07, 2008

Time:

11:08

 

Votes: Good (0) | Bad (0)
Login to rate this answer

Question Answered

This question has been answered, and points have been rewarded to the following experts:

theDude: 75
Snyke: 50

You're welcome however to comment or give additional information or if you wish, you have the ability to write an Answer Summary for this question by clicking on the "Answer Summaries" Tab.

 
No summaries have been submitted yet. Want to be the first?



Respond to this question:

New User

  Email:

Upon submission of this form, you will automatically be registered as a Quomon user and we will send your login information to this address

Registered User

Username:

Password:


Forgotten Password

 

New User

  Email:

Upon submission of this form, you will automatically be registered as a Quomon user and we will send your login information to this address

Registered User

Username:

Password:


Forgotten Password

   

"Psst, Quomon is a great site. Pass it on."     Tell a Friend  |   Link To Us  |   Save to Delicious  |   Digg! Digg it


All Questions


Language Options

English:

www.quomon.com

Español:

www.quomon.es

Quomon Blog

blog.quomon.com

Sponsors

Questions and Answers Software
Real Estate Postcards
Marketing Fulfillment