In March 2020 we made updates to simplify and streamline the main trustmark code.
To eradicate these issues, we removed jQuery from the main code. This means a few things for our customers.
- Trustmark file size is now 74% smaller.
- Trustmarks will now load slightly faster, particularly if your site is viewed from a slower or older computer or browser.
- There are no longer compatibility issues for sites using jQuery in their own code.
Additionally, we’ve added a new way the trustmarks can be loaded. Previously, trustmarks were only rendered once at the initial time the page was loaded. This caused issues for sites utilizing elements such as a 1-page dynamic checkout, where multiple checkout steps occur within one page. In this scenario, our trustmarks were only able to load on the first step of checkout.
With this new update, instead of just one initial scan, we’ve created an alternate code snippet you can add to your site that will allow continuous scans of a page, so that it’s always searching for places to display the trustmarks. This means that trustmarks can now be displayed in multiple steps of a dynamic checkout, and within other dynamic elements your site may utilize. This additional code snippet is optional and we recommend you only add it to dynamic areas of your site.
To enable continuous scanning, instead of adding the following code snippet as normal:
<script src="https://cdn.ywxi.net/js/1.js" async></script>
<script src="https://cdn.ywxi.net/js/1.js" id="trustedsite-code" data-rescan="1" async></script>