Google BookMark Page

Google Bookmark cleverly uses Javascript popup to open it server page and passes the current page’s location (URL) and title.

Click on the image for larger view

The code is relatively simple. Once you click on the bookmarks bar, it triggers

javascript:( function() { var a=window,b=document,c=encodeURIComponent; d=a.open(%22http://www.google.com/bookmarks/mark?op= edit&output= popup&bkmk=%22+c(b.location)+%22&title=%22+c(b.title) ,%22bkmk_popup%22,%22left=%22+((a.screenX||a.screenLeft)+10)+%22, top=%22+((a.screenY||a.screenTop)+10)+%22,height=420px,width=550px, resizable=1,alwaysRaised=1%22); a.setTimeout(function(){d.focus()},300) } )();

So basically sending document.location and document.title to the server page mark using HTTP GET.

But if the title is too large, it will not work (HTTP GET Limitations)

I tried to put the same javascript in IE 6.0, but IE’s popup blocker prevents opening the popup window. The wierd thing is IE thinks the popup is from the webpage you are browsing.

By: gavi on: