WordPress.org

Ready to get started?Download WordPress

Forums

Ajaxize
[resolved] Ajaxized Functions do not output their data before Alexa widget does its job (5 posts)

  1. korgay
    Member
    Posted 2 years ago #

    Hello yoav.aner and thaks for this great plugin. I have been able to create some ajaxized divs with your plugin and they work perfect. But to my surprize, I've just realized that my ajaxized divs wait alexa traffic rank widget to do its job and only then they output their data. This is a big problem for me because I generate half of my sidebar with ajaxized divs and when alexa trafic rank widget is slow my sidebar also loads very very slowly. Any suggestions will be much appreciated and thanks again :)

    http://wordpress.org/extend/plugins/ajaxize/

  2. yoav.aner
    Member
    Plugin Author

    Posted 2 years ago #

    If the widget is slow then there isn't much that ajaxize can do. Perhaps it's better not to use ajaxize for those and instead cache the result of the widget once so it loads faster?

    If you want to send me a link / example of a page where it happens I can try to have a look and see if there's anything I can do.

  3. korgay
    Member
    Posted 2 years ago #

    Thanks for replying :) But I think I couldn't make myself clear. My ajaxized divs on my sidebar work like a charm and they are reasonably fast. But, my ajaxized divs wait for alexa page rank widget (which has nothing to do with your plugin, but which, I think, is also some kind of javascript). I mean, unless alexa page rank widget finishes its job, my ajaxized divs do not output their data. This is not a problem most of the time, but if alexa is slow, then it becomes a problem.

    Anyway, here is my site: http://www.balikpesinde.com/

    The ajaxized divs are the last two widgets on the sidebar: FORUMLARDAKİ SON KONULAR and FORUMLARDAKİ SON İLETİLER (they are displaying latest topics and posts from the site forums).

    Alexa page rank widget is in the footer bu it is not visible; you can see it in the source code, look for <p id="alexa-footer-widget">.

    Thank you very much again :)

  4. yoav.aner
    Member
    Plugin Author

    Posted 2 years ago #

    Hi korgay,

    That's much clearer now. First of all, good to know there isn't a problem with ajaxize.

    As for your problem, I tried to have a quick look at your page, and if I'm not mistaken this results from the alexa javascript running inline and effectively blocking every other javascript until it finishes. This can result in other problems on the page, not just ajaxize, and is generally considered bad practice.

    This is the alexa code that might be blocking:
    <p id="alexa-footer-widget"><A href="http://www.alexa.com/siteinfo/www.balikpesinde.com"><SCRIPT type='text/javascript' language='JavaScript' src='http://xslt.alexa.com/site_stats/js/s/a?url=www.balikpesinde.com'></SCRIPT></A></p>

    Try to find an alternative widget that runs asynchronously, or change this javascript so it doesn't block (perhaps use this example). Another alternative might be to run the alexa widget in an iframe.

  5. korgay
    Member
    Posted 2 years ago #

    Thank you yoav.aner and sorry for returning late. As far as I can understand, the problem is just as you say:

    your problem [...] results from the alexa javascript running inline and effectively blocking every other javascript until it finishes

    I have not been able to rewrite alexa widget javascript asynchronously yet, but this is not something about your plugin anyway :)

    Thahks again for quick replies and help :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic