Solved

Opinions on Javascript obfuscators, anyone?

Posted on 2014-09-23
6
117 Views
Last Modified: 2014-09-23
I'm just trying to get a feel of how many people actually use JavaScript obfuscators, and I'd also be interested in your opinion on what you think about it.

Thanks.
0
Comment
Question by:elepil
6 Comments
 
LVL 58

Expert Comment

by:Gary
ID: 40340200
Waste of time. Period
Why do you want to do it?
0
 

Author Comment

by:elepil
ID: 40340242
Gary, I was thinking of making a "fat client" where all form validations will be done within the page with JavaScript. The alternative is to allow PHP to validate the form, but that might take longer depending on the traffic on the website. Also, it occurred to me that someone can just copy the page and remove all validations and submit the form.

I figured obfuscating the JavaScript might help.
0
 
LVL 82

Accepted Solution

by:
leakim971 earned 167 total points
ID: 40340253
good for lamers
experts will rewrite the code so, IMHO, it's not useless
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 58

Assisted Solution

by:Gary
Gary earned 167 total points
ID: 40340254
Js shouldn't be relied on for validation, yes you can validate the input before submitting to prevent unnecessary work at the server, but that is the only main reason (apart from giving tips to the user on how to fill in the form)

All validation should be done at the server side - never rely on the js to do the work, they don't need to remove the js, just disable js in the browser.

And obfuscation is irrelevant in this case.
0
 
LVL 83

Assisted Solution

by:Dave Baldwin
Dave Baldwin earned 166 total points
ID: 40340256
Obfuscating doesn't help, spammers and hackers have code to automatically de-obfuscate it.  It only prevents consumers from reading it.  For validation, you should use javascript on the page to help the user fill out the form correctly.  But you should also validate and check the submissions with PHP on the 'action' page because the spammers and hackers will post directly to your page and bypass all of your javascript.  You should be doing Both.
0
 

Author Closing Comment

by:elepil
ID: 40340319
I think I have an idea how other developers feel about this. Thanks for the feedback, guys.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: DanRollins
This article describes a JavaScript program that creates a maze made of hexagonal cells.  In Part 2 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7850-Hex-Maze-Part-2.html), we'll extend the program by adding a depth-…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now