Solved

Opinions on Javascript obfuscators, anyone?

Posted on 2014-09-23
6
118 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
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 
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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

Suggested Solutions

Avoid defining the variables in the global scope; trying to define them in a local function scope. Because:   • Look-up is performed every time a variable is accessed.   • Variables are resolved backwards from most specific to least specific scope…
Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
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…

770 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