• Resolved acleach

    (@acleach)


    I have a calendar list (forthcoming 9 days) in a sidebar widget. That combines five separate Google calendars and they have a number of years’ data in each. Rendering the week’s calendar takes more than five seconds: as a widget, WordPress has to render the widget before the page can be displayed, making the site really slow.

    I have managed to implement this as an AJAX request so that the page is rendered and, once displayed, the calendar is fetched. This means that pages are quickly made available for the user. (This is implemented via a custom plugin which captures the AJAX request and creates the calendar using its own new R34ICS object. The Javascript function receives the calendar code and injects it into a container element in the sidebar.)

    There is a small downside in that the sidebar’s pending AJAX request (a) stops any other AJAX request — they are queued behind it; (b) can’t easily be cancelled to go to another page. I reckon these are acceptable given the huge increase in the site’s overall responsiveness.

    Feature request:

    Provide an additional option “ajax=true” which would wrap the output in a Javascript function to lazy-load the calendar content.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Feature request: AJAX’ is closed to new replies.