Server-Side Rendering: Performance and Availability
This feature is available only upon request. Contact OneTrust Support to enable this feature.
Server-side rendering (SSR) is an application’s ability to convert HTML files on the server into a fully rendered HTML page for the client. The web browser submits a request for information from the server, which instantly responds by sending a fully rendered page to the client.
Benefits of SSR
A server-side rendered application enables pages to load faster, improving the user experience. Webpages are correctly indexed because web browsers prioritize web pages with faster load times. Rendering server-side helps efficiently load webpages for users with slow internet connection or outdated devices.
How to request SSR
Please reach out to your Customer Success Manager, Implementation Consultant, or contact OneTrust Support using the Create a Case web form to have SSR enabled for your tenant.
What to expect
Once enabled, the otBanner json file will be rendered server side after your next publish. The OneTrust Banner json file that is sent will be called bLayout-{languagecode}.json (i.e., bLayout-en.json for English) instead of ot{bannerLayout}.json (i.e., otFlat.json for a banner with a flat layout).
Only the OneTrust Banner json is rendered server side because this is the first file displayed when the script is called, while the Preference Center is not immediately displayed.
Client-side rendering
The preference center is not rendered server-side initially because it is not immediately displayed. It is loaded asynchronously after the initial server-side rendered content.
The otSDKStub.js script, called in the <head> section of the website HTML, asynchronously calls additional scripts and JSON files such as Domain.json, BannerSDK.js, geolocation.jsonp, language.json, Banner HTML/CSS.json, and Preference Center HTML/CSS.json. These are used to inject the banner and preference center into the page. The asynchronous loading design helps minimize page load times by allowing the website HTML to continue executing simultaneously with the loading of these components.
How the Cookie Banner and Preference Center Loads
Loading the Cookie Banner Script and Preference Center has been designed to minimize page load times by taking advantage of asynchronous loading. The graphic below outlines the process for loading the Banner Script and Preference Center.
Performance and Availability of the Cookie Consent Script
See the OneTrust Cookie Consent Performance Whitepaper for the results of network performance and availability testing.
Performance
Loading the Cookie Banner Script and Preference Center has been designed to minimize page load times by taking advantage of asynchronous loading. The graphic below outlines the process for loading the Banner Script and Preference Center.
-
The
otSDKStub.jsis called by the Cookie Consent Script in the<head>section of the website HTML code. -
The
otSDKStub.jsscript calls theDomain.jsonand theBannerSDK.jsscript asyncronously. The website HTML continues to execute simultaneously. -
The
BannerSDK.jsscript callsgeolocation.jsonp,language.json,Banner HTML\CSS.json, andPrefence Center HTML\CSS.json. -
The
BannerSDK.jsscript uses the information from the JSON files to inject the Banner and Preference Center.
|
Element |
Description |
Size (KB) |
|---|---|---|
|
|
The otSDKStub script initiates the loading of the Banner and Preference Center. |
150
Note:
This size may change as more functionality is added. |
|
|
The Domain JSON provides information about the consent settings. |
0.7* |
|
|
The BannerSDK.js script calls the elements needed to display the Banner and Preference Center. |
79.9 |
|
|
Provides the location of the site visitor to determine which Geolocation Rule applies. |
0.25 |
|
|
Provides the language of the Banner and Preference Center to load. |
4.4* |
|
|
Contains the HTML and CSS elements of the Banner. |
2.9* |
|
|
Contains the HTML and CSS elements of the Preference Center. |
17.3* |
*Configuration Dependent
Availability
OneTrust guarantees a high degree of availability for the Cookie Consent solution through our SLA of 99.95% during a given calendar month. In addition to this, the Cookie Consent solution has segregated the individual components of the Cookie Consent module so that even in the rare case of the main application being unavailable, published Cookie Banners and Preference Centers will not be affected.