JavaScript Tutorials
asynquence: The Promises You Don’t Know Yet (Part 1)
on("before", start)
Normally, my blog posts (and training workshops, for that matter!) are intended to teach something, and in the process I highlight projects that I've written to explore and experiment in that area. I find that to be an effective aid to teaching. However, this blog post...Pub/Sub JavaScript Object
There are three keys to effective AJAX-driven websites: event delegation, History management, and effective app-wide communication with pub/sub. This blog employs of all of these techniques, and I thought I'd share the simplest of them: a tiny pub/sub module I use on this site. If you've...
Tweet for Code #3
You don't need a thousand lines of code to make a big difference in any coding language. Oftentimes it's quite the opposite: a few tiny code snippets can do a world of good and accomplish big things. I asked my Twitter followers to tweet to me...
Using Events to Improve Bounce Rate in Google Analytics
The bounce rate cited by Google Analytics for this blog has always been high and it's been discouraging. Having a high bounce rate is bad, right? Or does that mean someone found what they needed and left, which would be a win? I'm not sure, but...
Better Compression with UglifyJS
UglifyJS is widely known as the most performant and effective JavaScript minifier available. UglifyJS' default minification with
--compress
is nice but it doesn't do the full job. There are a number of additional directives for thecompress
option, including:sequences
-- join consecutive simple statements using...Shaving Bytes with JavaScript Booleans
Developers are always search for ultimate way to create something with the least amount of code. This, of course, is one of the reasons we use minifiers: to serve code as small as possible. Of course this practice has numerous benefits, like faster download time, less storage...
Prevent XSS “on” Attribute Attacks in CKEditor 3.x
CKEditor 3.x had issues with XSS /security issues with
on
attributes. For example, you could trigger malicious code via anonerror
attribute -- ouch! Of course the problem has been fixed in CKEditor 4 but upgrading can be an issue if you have custom plugins. Here's how the issue...7 Things You Didn’t Know You Could Do with CSS
CSS and JavaScript, believe it or not, are starting to overlap as CSS adds more functionality. When I wrote 5 Ways that CSS and JavaScript Interact That You May Not Know About, people were surprised at how CSS and JavaScript have come to overlap.
CSS vs. JS Animation: Which is Faster?
How is it possible that JavaScript-based animation has secretly always been as fast — or faster — than CSS transitions? And, how is it possible that Adobe and Google consistently release media-rich mobile sites that rival the performance of native apps? This article serves as a point-by-point...
Stylus PX to REM Mixin
The
REM
unit is the hottest thing since Christina Ricci ... it's hot. And it's especially hot when it comes to font size. Rather than paraphrase a bunch of documentation as to why REM is important, I'd like to point you to Jonathan Snook's outstanding