(repost from last night)
I need your approval for something.
I'm working on a new UFlet. It uses XMLHttpRequest to fetch a new copy of the page, then highlights and inserts any new comments.
I'm concerned about how that could affect ads, so I added this bit of javascript:
//Make sure Illiad can afford new crayons
ifs=document.getElementsByTagName("IFRAME");
for(i=ifs.length-1;i<=0;i--)
{
//I suspect random is to bypass caches
bust = Math.floor(89999999*Math.random()+10000000);
ifs[i].src=ifs[i].src.replace(/&random=[^&]*/,"") + "&random=" + bust;
}
window.scrollTo(0,0);
This basically reloads each IFRAME on the page, and scrolls to the top of the page.
Would this be enough, is there something better I could do? |