1
Answer

Encrypting the java script from browser to see the users

I wrote a logic for restricting the files while uploading which having some extensions those extensions are I'm mentioning in that javascript function.my question is when the user inspects the elements from browser he can see the function that I wrote.then he can change the extensions also from source .i wants to hide the function from the browser.s there is a way to hide that.please help me.

Answers (1)

0
Photo of Midhun T P
NA 19.7k 281.2k 8y
Hi,
 
As per my knowledge, we can't hide the scripts from browser. The best thing that you can do is to minify your scripts. 
 
There are a lot of websites available for minifying scripts online. Just google it.
Please keep a copy of your original script before minifying, as the reverse process will not provide your original file.