SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Member
    Join Date
    Jul 2012
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    JavaScript Obfuscator?

    Hello all,

    I was wondering how many of you currently Obfuscate your program code? in particular I am interested in those of you who go to the trouble of Obfuscating your JavaScript, and if so why? and what software do you use?

    The reason I ask is that this was a practice I initially thought a good idea to protect my clients investment from their competitors, however I am very much leaning towards an Open Source approach development these days as best practice - after all good code should be free for everyone to view!

    With development tools such as Firebug which appear to be Impervious to even the best JavaScript Obfuscation tools - is it ever worth the bother?

    I look forward to your thoughts and views!


    Kind regards,

    Matt

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    23,599
    Mentioned
    411 Post(s)
    Tagged
    7 Thread(s)
    Hi Matt.

    Quote Originally Posted by Matt Tacchi View Post
    With development tools such as Firebug which appear to be Impervious to even the best JavaScript Obfuscation tools - is it ever worth the bother?
    Personally, I don't think so. As you say, you really can't hide the front end stuff, no matter how hard you try. Your time is better spent elsewhere.

  3. #3
    SitePoint Member
    Join Date
    Jul 2012
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Ralph M - Thanks for your reply. I agree it doesn't seem sensible, and not really in the spirit of an 'open web' which is surely the only way forward

  4. #4
    SitePoint Member
    Join Date
    Jul 2012
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello all,

    I was wondering how many of you currently Obfuscate your program code? in particular I am interested in those of you who go to the trouble of Obfuscating your JavaScript, and if so why? and what software do you use?
    We use VarHammer JavaScript obfuscator to protect client-side scripts.

  5. #5
    padawan silver trophybronze trophy markbrown4's Avatar
    Join Date
    Jul 2006
    Location
    Victoria, Australia
    Posts
    4,095
    Mentioned
    28 Post(s)
    Tagged
    1 Thread(s)
    I do use uglify to compress and minify all my scripts.

    Purely for optimization, not to try and protect the code - there's nothing worth protecting in javascript anyways.
    With development tools such as Firebug which..
    You can actually hide script from the DOM inspector pretty easily if you don't put stuff in the window scope and wrap everything in an IFEE
    This coupled with uglify makes it pretty hard to see what's going on.

  6. #6
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,604
    Mentioned
    24 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by markbrown4 View Post
    You can actually hide script from the DOM inspector pretty easily if you don't put stuff in the window scope and wrap everything in an IFEE
    Even if you do that the JavaScript debugger can still step through the code statement by statement so that you can easily see what each statement is doing.

    All browsers except Firefox (and IE7) have a debugger built in and there are debuggers available to add to Firefox and IE7 that provide them with the same ability to step through any JavaScript one statement at a time.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  7. #7
    SitePoint Member
    Join Date
    Oct 2012
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Javascript obfuscation isn't worth the hassle - you're far better to protect your php where the guts of your processing will be done. It's there where your intellectual property really matters. We compress Javascript but don't generally obfuscate Javascript unless it comes that way from a third party library.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •