RE: cloneNode, Ad Rotation, caching, iframes - issue issues issuess
"Maninder, Singh" <[email protected]> Thu, 30 Mar 2006 00:32:30 +0530
| Newsgroups | gmane.comp.web.dom.wdf |
|---|---|
| Message-ID | <4D8B620F4FDA414982B23A3E7F6A8EF113409249@hydmail01.hyd.corp.int.untd.com> |
Thank you Ian. You described my problem better than me :) The issue that I am facing is also because when I call getAdTag(), it document.write's an iframe onto the page with src as an "external" url. When that url is hit upon, it serves a page (from the external domain) with html that has 3 more iframes with src's to 3 different ads. Now, if I capture this to a variable and move it into the cache, then move the cache to active area, because of the $rand thingie in the 3rd party url's, it is sending requests again and it's not giving a feel of picking it from cache. I was thinking that if I use cloneNode(true) it will clone everything and keep it in cache but I was definitely wrong. Any thoughts on this? I am open to any thoughts you may have. Thank you, Mandy. ________________________________ From: [email protected] on behalf of Ian Petersen Sent: Thu 3/30/2006 12:22 AM To: [email protected] Subject: Re: [wdf-dom] cloneNode, Ad Rotation, caching, iframes - issue issues issuess Hi Mandy, It sounds like you're having problems with cloneNode. Is there a reason you need to clone the ad? As I understand it, your algorithm is like this: 1. download an ad into a cache 2. when the user makes an action, move the cached ad into the "active" area 3. goto 1 If that's right, then you're never going to re-use the node that you're trying to clone. Why not just move it? In other words, use cache.innerHTML = 'downloaded content' to create the cache, and then active.removeChild(active.firstChild) active.appendChild(cache.removeChild(cache.firstChild)) to move the cached ad into the active area. Anyway, it was just a thought. Oh, and it's been a while since I've worked with the DOM directly, so I don't know if my snippets will actually work--they're just meant to be illustrations. Ian -- Tired of pop-ups, security holes, and spyware? Try Firefox: http://www.getfirefox.com Unsubscribe [email protected] List info http://www.quirksmode.org/dom/list.html ________________________________ YAHOO! GROUPS LINKS * Visit your group "wdf-dom <http://groups.yahoo.com/group/wdf-dom> " on the web. * To unsubscribe from this group, send an email to: [email protected] <mailto:[email protected]?subject=Unsubscribe> * Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service <http://docs.yahoo.com/info/terms/> . ________________________________ [Non-text portions of this message have been removed] Unsubscribe [email protected] List info http://www.quirksmode.org/dom/list.html Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/wdf-dom/ <*> To unsubscribe from this group, send an email to: [email protected] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/