The right way to embed


I occasionally rant about “web 2.0” services which want me to embed Javascript on my page to get the functionality. Besides them being a security risk (because they can change the JS on their servers at any time and p0wn all my visitors – and it doesn’t have to be malice on their part – it might just be that they themselves got p0wned – and are you comfortable knowing that if any of the X gadgets you use turns malicious your visitors might get infected?), it also slows down the page loadtime, because loading of scripts is done synchronously (given that they can affect the structure of the page, browsers need to load them entirely before they can continue).

But today I wanted to praise two widgets which IMHO get it right. I’m talking about Feedjit which shows the (approximate) physical location of your last N visitors and the Weather Sticker from Weather Underground. The things I like in them:

  • Minimal fuss (no signup) required to get them.
  • They are just an image! (Feedjit offers also a javascript version, but it is optional)
  • Given that it is just an image, the browser can download it in parallel and doesn’t need to suspend the processing of the page.
  • Even though it is just an image, the provider gets a link back. Also, it can

    Finally, it works when Javascript is not available and it eliminates a very obvious way to attack your users!

I wish that all gadget providers would offer a lo-fi version of their gadgets. A+ to both of these services (and you can find them in my sidebar).

, , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *