Async javascript loading for reduced page load time

Many of my websites have the standard addins for integrating with the rest of the world- the gadget, the facebook like button, etc. A number of them also use google maps. Each of these includes a javascript file from a remote source, which normally will slow down the load time of your pages. Google fixed their analytics scripts some time back to allow loading them asynchronously, so the page is not paused while waiting for it to load. Strangely, a lot of scripts don’t yet support this, and I’m seeing in google webmaster tools that the calculated load time of my pages has suffered as a result. What should be a tiny page that loads in literally milliseconds, is now a 3 to 5 second loading affair.

After some research, it looks like this is not a simple task to undertake. There are a number of ways to load a script async, but each has a set of drawbacks. This seems to be a great overview of the various methods currently avaialble: . I’ve seen that html5 also includes direct support for allowsing async loading of scripts, so maybe eventually this will no longer be a problem, but for now it’s a pretty big headache.

As time permits (or, when I get the chance to delegate it), I’m planning to try the solution listed on that linked page and see if addthis, facebook, google maps, perhaps even adsense, and even a wufoo form can perhaps be loaded in this async manner. I’ll report the progress here.

Orchard multitenancy configuration

Am now successfully running multiple sites on a single instance of Orchard (this one). Can’t really divulge what they are, but I will comment on the configuration- when making a new tenant, make sure you have no spaced in the name. It doesn’t fail immediately, but does a few steps later. The solution requires – 1. shut down the orchard website instance 2. open the tenants subfolder in the app_data and find the offending folder with spaces in the name, and delete it. 3. restart the website.

Note that even if you abandon an existing “spaces in name” corrupted attempt, it will still blow up every time you try to create a new one until this is resolved. And, if you don’t shut down the site first, it will keep recreating this messed up folder. fun times.  

torsion bar valve springs

When I’m running, I get lots of weird ideas. Today, I thought, why not use torsion bars for valve springs in engines, instead of the usual coil spring? Benefits should include- less moving mass, adjustable pre-load, and… well that’s all.

So, this falls into the “new-old” ideas category – apparently was done as far back as the 50’s- even this clunker had them –

And some F1 cars and bikes have used them with good effect. So, good new-old idea ๐Ÿ˜‰

If you can read this…

Site is moved over to new server, and running on orchard 1.0 now.

Porting was a bit painful – i used the orchard blogml module to export posts from the old server, and then import to this new one. Worked great, except that tags were mangled up. After tinkering a bit, i just dozed through and fixed the tags on all the posts. Fortunately not that many to fix.

So now to see what all orchard 1.0 can do.