javascript

  • The Hackiest Hack that Ever Was Hacked

    ·

    I was first introduced to Plupload when I was building websites in .Net.  I had some great HTML5 file upload tools that worked wonders in my browser of choice, but most of my colleagues (and about 80% of our clients) were using a browser that didn’t support the API.  I used Plupload as a reliable

    Read More

  • Don’t Dequeue WordPress’ jQuery

    ·

    As a moderator on the WordPress Stack Exchange, I end up spending a lot of time on the site.  I see lots of great questions, lots of not-so-great questions, and several you’ve-got-to-be-kidding-me questions.  But the question I see the most often frustrates me: How do I remove WordPress’ jQuery and use Google’s CDN version instead?

    Read More

  • jQuery as a Global Event Bus

    ·

    Some time ago, I made a mistake.  Rather than taking the time to truly understand how events worked in jQuery, I built my own JavaScript library to handle event delegation. It worked, but why reinvent the wheel? It turns out jQuery is perfectly capable of serving as a global event bus for all of your

    Read More

  • The Anatomy of an Exploit

    ·

    I’m a huge fan of security. I spend many a weekend experimenting with new encryption techniques, hash algorithms, and security protocols. As a result, I also come across several different server exploits in the wild. PHP hacks, [cci].htaccess[/cci] hacks, JavaScript injection, etc. I once even saw a server hacked through a corrupt PNG image that

    Read More

  • Object-Oriented JavaScript

    ·

    First a caveat: JavaScript is a prototype-based language, not an object-oriented language.  Now that we have an understanding of that very important fact, let’s learn how to use JavaScript as if it were object-oriented. A few weeks ago, I was asked to teach a couple of my colleagues how to code with JavaScript.  We’re building

    Read More

  • JavaScript Event Bus

    ·

    I was taught some time ago to always focus on decoupling my code.  Your server and the client (browser) should not need to know anything about the structure of one another.  They can pass information back and forth, but that should be the full extent of their integration.  There are several reasons for this, but

    Read More