Deprecation of the Option to Disable AJAX Loading
Mar 28, 2024 • 4 minutes to readBeginning on December 7, 2023, Caspio initiated the process of phasing out the option to disable AJAX loading for DataPages. This was to prepare for Google Chrome’s deprecation of third-party cookies, as outlined in their blog post.
Caspio’s commitment to fostering future-proof applications led us to introduce AJAX loading as a standard feature in 2018. Having diligently maintained backward compatibility for over five years, we are now taking the step to deprecate non-AJAX loading to ensure the seamless and optimal operation of your DataPages, aligning them to industry standards.
After April 1, 2024, AJAX loading becomes the default behavior for all DataPages. The option to disable AJAX loading is no longer accessible.
For most DataPages, using AJAX loading does not cause any issues. The retirement of non-AJAX loading might have the following impact:
- AJAX-enabled DataPages might initially require higher data transfer due to the loading of necessary web components and scripts in the browser. However, this is offset by more efficient subsequent interactions, such as data updates and sorting, which only reload the active DataPage rather than the entire page. If your plan includes metered data transfer, this optimization could notably impact your data usage pattern after the non-AJAX deprecation date.
- In Reports, records are first sorted according to the sorting criteria, and then by the chronological order of their entry. With AJAX loading disabled, the second-level sorting order was random.
- In Reports, currency values and numeric values are now formatted by default to four decimal places and six decimal places respectively (up from two).
- In Forms and Details Reports, validation for file size limit now occurs upon selection rather than during submission.
- For data grouping, the default collapsed view setting is now applied consistently. With AJAX loading disabled, in Tabular Reports, grouped values appeared above a collapsed row.
- If you use a custom JavaScript with functions or events such as document.write(), onload, onsubmit or reference specific object IDs, please review the scenarios below and update your DataPages accordingly.
Script Content | Required update |
---|---|
Your script refers to an element through the DOM structure (traversing the HTML). | Revise your script to use the element “ID” or “name” attribute instead. This is required because AJAX DataPages have wrappers around the rendered content. For example: <div id=”cbOuterAjaxCtnr_123456789″> |
Your script or CSS refers to any button object by its “ID” attribute. | Revise your code to refer to the “name” attribute. For example:
|
Your script includes document.write(). | Revise your script to use other data output methods, for example innerHTML, alert(). |
Your script contains an onsubmit event. | If your script contains an onsubmit event, for example: <script type="text/javascript"> window.onsubmit = function() { // do something }; </script> replace the onsubmit event in your script with Caspio’s built-in event handler: <script type="text/javascript"> document.addEventListener('BeforeFormSubmit', function (event) { // do something }); </script> |
Your script contains an onload event (using JavaScript or jQuery). | If your script contains an onload event (using JavaScript or jQuery), for example: <script type="text/javascript"> window.onload = function() { // do something }; </script> Or <script type="text/javascript"> $( document ).ready(function(){ // do something }); </script> replace the onload event with Caspio’s built-in event handler: <script type="text/javascript"> document.addEventListener('DataPageReady', function (event) { // do something }); </script> You can also use event.detail.appKey or event.detail.uniqueSuffix to define the DataPage event for executing specific functions: <script type="text/javascript"> document.addEventListener('DataPageReady', function (event) { if (event.detail.appKey == 'MY_DATAPAGE_APPKEY') { //do something } else if (event.detail.appKey == 'MY_WEB_FORM_APPKEY') { //do something } }); </script> |
We are here to help!
- If you have a Professional Services Maintenance Plan: Our team will work with you to schedule a time to review your applications and make necessary adjustments without any extra cost.
- If you subscribe to Managed Application Services (MAS): The review and update of your applications will be covered by your MAS plan. A representative will contact you to schedule a time for this service.
- All other Caspio Customers: Our team can review and fix your DataPages. Please contact your Customer Success Manager for details.