The Daily Static
  The Daily Static
UF Archives
Register
UF Membership
Ad Free Site
Postcards
Community

Geekfinder
UFie Gear
Advertise on UF

Forum Rules
& FAQ


Username

Password


Create a New Account

 
 

Back to UserFriendly Strip Comments Index

ATTN: Illiad by ToLazyToThink 2006-11-19 12:55:59
(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?
[ Reply ]
  I *think* that's sufficient. by Illiad2006-04-02 12:24:46
    No problem by ToLazyToThink2006-04-02 12:41:04
      OK...proceed by Illiad2006-04-02 15:12:58

 

[Todays Cartoon Discussion] [News Index]

Come get yer ARS (Account Registration System) Source Code here!
All images, characters, content and text are copyrighted and trademarks of J.D. Frazer except where other ownership applies. Don't do bad things, we have lawyers.
UserFriendly.Org and its operators are not liable for comments or content posted by its visitors, and will cheerfully assist the lawful authorities in hunting down script-kiddies, spammers and other net scum. And if you're really bad, we'll call your mom. (We're not kidding, we've done it before.)