Zaraz caching issue

The link to the Zaraz script is. Or getting cached as show in the google page speed test respond.

This is causing the slowing down of the website speed.

Any help?

The s.js script is generated dynamically, so it won’t do good for you to give it a large cache lifetime.

How have you measured the website speed? Do tests show the website loads faster with all of the 3rd party libraries than with Zaraz enabled? Or is it a diagnostic tool is highlighting the script as not having a cache policy?

I have used google page speed test tool. I am getting a 100 score on it but the diagnostic section shows that the script (Zaraz) is not having a cache policy.

Currently I am using Google analytics tracking code on the website as I have dis abled Zaraz. If i enable zaraz and remove the analytics code, zaraz is shown as an additional request on the server. Google tracking code does not show making any additional request.

Curious, why did you opt to enable Zaraz over Google Analytics code on the website in the first place?

The zaras script is static and not dynamic as showing in Keycdn testing tool.

Have found a solution to this. The caching issue disapperas if I insert the Zaraz code manually and not automatically as was done earlier. But the issue persists if I revert back to the automatic insertion of the script.

If I understand correctly, the website is getting a perfect pagespeed score (100) and works fast, but Lighthouse still reports an “issue” that the s.js script is not cached. I’d consider this not to be an issue for the performance of the website. Not all hints/issues reported by Lighthouse will have a noticeable impact when addressed. Please correct me if I misunderstood somtehing

I understand , and had myself thought so too. But, the problem is the lighthouse score is perfect 100 but in the core web vitals section of the report the urls began dropping from category “good” to “needs improvement”. Also the number of visitors declined proportionately.
Light house report does not have any diagnostic errors to report.

The score on Pingdom is 99 and is ‘A’ for Keycdn website performance testing tool.

I have even tried changing the theme but to no avail.