This article refers to the latest version of the Cookie Solution. If you haven’t already, we strongly recommend that you upgrade your Cookie Solution by simply copying the new code here (Dashboard > [Your website/app] > Cookie Solution > Embed) to avoid any CSS related conflicts and to access all the new features of the latest version. Alternately, you can find the old guide related to the legacy version here.
If you would like to use a specific version of the iubenda cookie solution, you simply need to insert the following link in lieu of the one normally used in the Cookie Solution:
The “0.11.36.4” value must be substituted with the number of the version to be used. Available versions are found in the Current and Stable channels, starting with version 0.11.36.4 (consult the complete changelog for a listing of all released Cookie Solution versions).
Unlike the default link, the link mentioned above has a very extended cache configuration as it points to a specific version which does not require future modifications.
By applying the modification described above to the Cookie Solution, the iubenda_cs.js resource will load a new file containing the desired version. It’s a best practice, also adopted by Google for the loading of Google Analytics, as a way to achieve a compromise between the need to update the Cookie Solution and the loading/cacheing speed. The iubenda_cs.js file is in fact a file with a brief cache of few bytes, which in turn calls the real Cookie Solution, whose cache is much more extensive.
Alternatively, you can bypass iubenda_cs.js and directly load the file with the hash of the version and you will be able to:
- Eliminate an intermediary passage (resulting however in an almost negligible gain of a few milliseconds)
- Access a version of the file with a very long cache
Direct loading of the Cookie Solution
If Google PageSpeed provided you with a suggestion similar to the following, we can help you solve the problem:
Look through the browser’s cache: If there is a maximum age for statistic resources in the HTTP headers or if an expiry date is set, the browser will load the the resources previously downloaded from the local disk instead of from the network.
To bypass iubenda _cs.js, the first thing to do is get the hash from the desired version. As we saw before, you need to substitute “0.13.20” with the version of the Cookie Solution you wish to activate and visit cdn.iubenda.com/cs/versions/iubenda_cs-0.13.20.js (if you wish to activate the last available option, head directly to the following address).
Copy the content of the parameter
e="xyz", which is in fact the version’s hash. For example, if we take version “0.13.20” visiting https://cdn.iubenda.com/cs/versions/iubenda_cs-0.13.20.js we will have
At this point you can compile the new URL with the hash of the chosen version. To do so, simply substitute the link above with the one normally called in the Cookie Solution code. To create the URL, you can use the following structure:
parameter value “
Using the last version’s hash for example, the result is the following:
If you decide to block the iubenda Cookie Solution at a specific version, we suggest that you manually update it so that you may continue to benefit from our updates.
Direct inclusion of the activator inside the page
It’s possible to include the part of the code relative to the scripts, directly in-page (inline); this code is known as the inline activator. Scripts can be activated through the inline activator even if the iubenda_cs.js primary resource is generically unavailable or in error.
For more information and code samples, see Banner and Prior Consent – Setup and Customization.
(Optional) Suggested settings for performance optimization
inlineDelay value (integer, milliseconds, default 500), you will reduce the total time of activation.
Keep in mind that
inlineDelay works only with the “-inline” block, so it is reduced only to that kind of snippet. Its default value is 500, but we recommend to not set under 300.
It is highly recommended to check the activation of the snippet shown on your page if this setting is changed.