August, 2009


19
Aug 09

Avoiding Latency when Using 3rd Party Widgets and Plugins

Anyone maintaining a site, blog or similar at some point has been tempted to add a widget or plugin provided by a 3rd party source. Twitter, Digg and ShareThis are just a few examples of sites that provide code and/or plugins (widgets) to help provide some level of dynamic and valued content. Although each of these can be incredibly useful (at least I think so as I’ve installed the Twitter WordPress plugin on this blog), they implicitly add page-rendering dependencies to your site as anyone who visits waits around for their code to load. Generally, this isn’t all that big of a deal as most of these sites have incredible uptime. But then there are sites like Twitter who seem to have some serious issues of staying alive. Particularly with plugins for content management applications like WordPress and the like, you have very little control into where the source will be loaded in the document and without any intervention, a staggering Twitter will throw your site into a tail-spin of foot tapping until your visitor’s browser finally gets fed up (after 30 seconds or so) and gives up the download. In the meanwhile, expect that person to not only leave your site but likely never come back. Not exactly what you’re looking for. Personally, I got fed up with Twitter’s lack of reliability, killing my load times and losing visitors. Luckily, if you are using a modern web server and you have access to modify the configuration, there is a simple patch you can apply to pull the reins back in and gain control of your own site performance. The example below is a patch you can apply to the Apache HTTP web server config although can be cross-ported to any of the other modern web servers that support Proxying.

Continue reading →


8
Aug 09

devbarjs: A cross-browser development tool and plugin framework.

The classic frustration with any web development generally arrives the first time you fire up a new web browser to see how your blood, sweat and tears end up looking outside of your favorite environment. This is the time when tears splatter across monitors, brilliant minds of less than a quarter century losing their hair faster than a diseased mammal at spring time, disaster striking in the form of dogs and cats living together, utter chaos. It may be a trailing comma on character 3,565 (of 35,355 lines of JS) or an easy mistake of using a position: fixed CSS attribute, inherited from a 3rd party library. A simple compilation of stupidity and carelessness combined to transform a functional LCD panel into a web of cracks; each creating a wake of red, purple, blue and yellow as it trails as to further indicate you are again down to only a single monitor from your original two. It is this pain that has brought me to give you devbarjs. I’m sorry and you’re welcome all wrapped up into a single, extensible package.

Continue reading →