multi size ads

  • ed brandmark

    ed brandmark - 2014-02-24

    Hi all,

    Last post for today as I've been working on this implementation and want to get something ready for testing.

    In this case, I have a solution I use and want to make sure it is valid.

    Like others have mentioned there is often the case of dynamic size ads so if I have a 300x250 safe iframe, I may get a 300x600 ad that isn't planning on expanding and thus doesn't have any code to make the iframe bigger.

    My code can detect the size of the ad returned so I just do this and then initiatie my own expand command from the ad back to the page and this seems to work.

    Is this implementation valid?

    Ed Brandmark
    Princ S/W Eng

    • Chris Cole

      Chris Cole - 2014-02-25

      As of v1 your implementation is the most valid workaround. Dynamically sized ads is a hot topic for of the spec. I'd encourage you to keep posting any recommendations or learnings so we can incorporate this feedback into the spec process.


  • Sean Snider

    Sean Snider - 2014-02-25

    Agree'd. In Yahoo! we have some custom wrappers that handle this by basically knowing up front that the ad could be 1 of 5 sizes.

    Basically in there will likely be a resizeTo/resizeBy set of methods to solve this for you. . but for now this is really the only option, unless you implement some from of custom code inside the SafeFrame to do auto-detection and custom messages.

    Keep in mind though that if you do this, the ad in question cannot expand again, until you first call collapse.

    • ed brandmark

      ed brandmark - 2014-03-03

      That last line is very interesting. So if I do an expand, the next expand is rejected? That could be a show-stopper until the resizeTo/By exists in which case,I guess we can call that and then call expand.

      We have spots that can serve 300x250, 300x600, 300x1050 and all can expand and we don't know ahead of time what serves.

      Thanks again for the quick responses.

  • Sean Snider

    Sean Snider - 2014-03-05

    Yep that's right. It's a one to one state. It's shouldn't be too much of a show stopper though. You do your auto-expansion. Then if you want to re-grow (to do a real expansion say when a user clicks), you just collapse it 1st, and re-open, and repeat.

    But yes I know that's a pain. . .I swear I'm working on the resize stuff :P


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks