replaced server calls by wp functions. using img instead of iframe. onbeforeunload for webkit browsers.