Minor Spring Upgrades

After a bit of spring cleaning, I’m happy to present to you the new Alchemi.st.

You’ll probably note immediately the new design. It’s based of an excellent, free theme called “Codium Extend” from code-2-reduction.fr. I made some minor tweaks, not enough to really call it my design at all. What’s nifty about this particular design is that it reorganizes itself automatically based on the size of the browser window. That means that alchemi.st will look good on your phone, ipad, and laptop.

What’s more interesting though, is perhaps what you might not notice: I’ve patched Automattic’s lazy load plugin so that it also lazily loads all of the youtube and vimeo videos as well. Should make the blog feel snappier.

Here’s how to patch the lazy-load plugin for iframes:

in ./js/lazy-load.js change:


and in lazyload.php add this line in right before the “return $content”

And that’s it! It should work as advertised.

Additionally, I’ve updated my wordpress/nginx config so that I can concatenate and asynchronously load all my javascript from amazon cloudfront with W3-totalcache.

To get it to work, first off, you have to instruct cloudfront to forward all query strings to your blog. Secondly, you need to configure w3-totalcache to rewrite the urls for the minified javascript and css. Third, add this to your nginx configuration for your blog:

And that’s all. Let me know if you have any questions.


  • mike
    May 27, 2012 - 3:48 pm | Permalink

    Does this speed up the facebook and twitter iframes from sharedaddy etc?

    • admin
      May 29, 2012 - 11:29 am | Permalink

      You’ll have to change the way sharedaddy includes the iframes, so that they default to “about:blank” with the data-lazy-src value pointed to the correct values. Let me see if I can make it happen. I’ll report back!

  • July 23, 2012 - 6:46 pm | Permalink

    This is really cool :)

  • Sebben
    August 2, 2012 - 8:11 am | Permalink

    When I add $content = preg_replace I get this error –
    function.preg-replace]: Compilation failed: unmatched parentheses at offset 3 in
    ……/wp-content/plugins/lazy-load/lazy-load.php on line 46

    What am I doing wrong?

    • Bill
      October 4, 2012 - 1:53 pm | Permalink

      Dunno. I stopped using my custom lazyloader, mostly because the speed improvements were minor and it meant that I couldn’t do an infinite scroll thing.

Leave a Reply Cancel reply

Post was not sent - check your email addresses!
Email check failed, please try again
Sorry, your blog cannot share posts by email.