MyBlogLogSpace? A widget hack.

UPDATE: Looks like MyBlogLog has implemented my idea. Horay!

I love MyBlogLog. It’s a simple elegant idea perfectly executed. You can see their widget on the side of my blog, listing the last 8 people who’ve been here.

The thing is, the “people-watching” aspect of it has a distinct MySpace flavor, but MySpace is the one place where their widget won’t work. (Because it’s in JavaScript.)

About a week ago I woke up in the middle of the night with an idea of how MBL could work on MySpace. I just got off the phone with founder Eric Marcoullier and he thought it should work too. Maybe we’ll see it in action someday? Would be awesome.

So excuse me while I geek out for a bit!

  • On MySpace, you can’t use JavaScript and Flash movies can’t “phone home” to your server.
  • You can however, have images that are pulled from off-site.
  • The server which supplies the image can set a cookie on the viewer’s brower.
  • So, your “widget” then becomes 5 (or whatever) images wrapped in link tags, numbered 1 to 5. This is the HTML you have folks copy onto their page.
  • When a page is viewed and the images are displayed, the server performs the following when serving the first image:
    • Looks for a cookie identifing the person viewing the page
    • Looks in DB to find the last 5 viewers and get their avatars.
    • Records this list of 5 in a newly set cookie. (Or alternatively stores it in a special table in DB) This is the important step–we’ll need this record when someone clicks.
    • Serves up the avatar image along with the needed cookies
  • Sometime later, the page viewer may click on one of the images.
    • The server will only know that the viewer was on page X and that they clicked on (e.g.) user image #3. At this point we don’t know which avatar was in that #3 slot.
    • It is possible that other people may have looked at the page since the images were served, so the avatar they clicked on may no longer be #3. E.g. maybe they’ve been bumped to #5. So we can’t look in the master DB.
    • The solution is to look in the cookie we set (or in the special table). This will tell us which 5 avatars where served up to this particular viewer
    • Do the cross reference and take them to user page of the avatar they clicked on.

You can see how it might look like on my MySpace page. So that’s my geek-out for the day. I’m really fascinated with widgets in general and think they are a good thing; a de-centralizing of the web. With any luck, walled gardens like MySpace will soon be forgotten. But until then…

12 thoughts on “MyBlogLogSpace? A widget hack.”

  1. Trakzor has the right idea, but since it doesn’t give any candy to the viewer of the page, I don’t think it will really catch on. The beauty of MyBlogLog is that everyone visiting the page can see the action. And if they’re not registered, they feel like they are missing out on the party.

    There’s an interesting tension mounting between RSS readers (where Widgets cannot tread, but your feeds are all in one place) and the blogs themselves. (See Andy’s post on this.

  2. There is a better IMHO product out there called

    It has a recent visitors blog widget and also a profile widget that will allow you to inject your profile into your blog.

    The only thing I dont about it is that they don’t give you enough space for multiple website or blog.

    Anyway I think is generally a great site and the customer service is very responsive.

  3. Does anybody know how MBL identifies me (an MBL member) on a website that uses the MBL widget? From my understanding they need to read the MBL cookie and check if I am a MBL member or not. Or am I wrong? This is cross browser cookie code – I tried to code somthing like this by using an image or a stylesheet but it will not work on IE – because it blocks reading cookies from other domains.
    Anybody an idea how they done it`?

  4. Hi Andy,
    It’s pretty simple really. The MBL widget is an external javascript file pulled from So when the MBL server serves up this file, it has access to any cookies for the domain. Your MBL cookie is from that domain–not your website domain.

  5. Hi Stan, no – thats not working on IE – due to security restrictions. You can’t access a third party cookie this way 🙁

  6. I’m not sure what it is you’re trying to do. Are *you* trying to get access to the MBL cookie? Because that is exactly what the security restrictions are there to prevent. Your code (coming from your domain) has no access to the MBL cookie. However, your code *can* include the javascript file from MBL, and the contents of this file will be changed by the MBL server based on the MBL cookie you have.

    If you have more questions, why don’t you email me?

Comments are closed.