ICS Calendar version 11.1.0 is out today, and with it come a few improvements to AJAX functionality.
First off, what is AJAX?
AJAX stands for Asynchronous JavaScript and XML… although it more commonly uses JSON now than XML. But the acronyms aren’t important. What it really means is it is a way to dynamically update the content in part of a web page, without reloading the entire page.
ICS Calendar does not use AJAX by default. The calendar data is processed along with the initial page load, and is sent to the browser as regular HTML. However, ICS Calendar has had optional AJAX since version 10.3.
With the AJAX parameter in your shortcode, the initial page load includes only an empty container for the calendar. Then after the page is rendered by the browser, an AJAX request is made to retrieve and display the calendar data.
The main benefits of loading the calendar this way are a) calendar data doesn’t get erroneously cached by third-party caching plugins, and b) large calendars can load without delaying the rendering of the rest of the page.
What’s new in ICS Calendar 11.1
There are two major changes in version 11.1.
First, the AJAX calendar now automatically refreshes. ICS Calendar stores calendar data for a certain period of time (by default, one hour, but you can change that on the Settings page). Now, when a calendar is loaded via AJAX, ICS Calendar will fire off the AJAX request again on that same interval… if the page is kept open long enough. This is a great option for kiosk displays.
The other change is helpful mainly for sites that have a large number of calendars. There’s now an admin setting to always use AJAX to render calendars. Previously, calendars would only load via AJAX if you included ajax="true"
in each individual shortcode. Now with this setting turned on, all calendars on the site will automatically use AJAX. In a future update, this setting will be turned on by default.
—Scott