Forums

[resolved] [Plugin: WP Super Cache] Is There Any Way I Can Keep A Dynamic Widget...??? (5 posts)

  1. deMelo
    Member
    Posted 3 years ago #

    Hello...

    I want to speed up my wordpress install but I need to keep one dynamic widget...
    Are there any tricks that will make this possible...???
    Maybe an iFrame or a Ajax call or something...???

    Thanks...

    deMelo

  2. Donncha O Caoimh
    Member
    Posted 3 years ago #

    You'll have to change the widget so it uses Javascript to update. An AJAX call would work fine.

  3. devu
    Member
    Posted 3 years ago #

    Hi donncha, I have one more question about widgets and WP Super Cache :)

    I'm moving one of mine on Ajax so that it's compatible with WP Super Cache. I have just one blog with one wordpress instance and can't keep on installing/uninstalling the cache for testing on that environment.

    I just need to know how does your plugin manage wordpress widget activation in the sidebar. Is there any documentation I can read about this topic?

    The widget I am moving on ajax just need to know the directory where the plugin is installed so that it can do the xmlHttp call to the right file.

  4. Donncha O Caoimh
    Member
    Posted 3 years ago #

    You could call wp_cache_no_postid() if the function exists, that will clear the cache. Does activating a widget set off any action?

  5. devu
    Member
    Posted 3 years ago #

    Hmmm... so, when I install a new widget, I see it in not cached pages, right? If, when not cached, the php writes:

    <script type="text/javascript" src="http://www.yourdomain.com/blog/whatever/wp-content/plugins/my-plugin/myplugin.js"></script>
    <script type="text/javascript">
    var url = "http://www.yourdomain.com/blog/whatever/wp-content/plugins/my-plugin/myplugin.php?postId=123somethingelse=abc";
    doSomething(url);
    </script>

    then when the post is cached, does WP Super Cache store the complete generated html? If so, I could just warn plugin users that once enabled, my widget won't appear until the cache has been refreshed.

    Thanks

Topic Closed

This topic has been closed to new replies.

About this Topic