TransWikia.com

Why is Craft loading jQuery via cpresources? And can I stop it?

Craft CMS Asked on July 1, 2021

I’ve been doing some performance checks on a website I’m building, and noticed that jQuery 3.5.1 is being loaded via cpresources:

Sources pabel

Why is it doing this? And can I stop it? I’m already loading jQuery 3.5.1 in my scripts.js file (combined with some other stuff and minified using gulp & webpack).

One Answer

If any of your image transforms have not previously been processed they will make a call to /cpresources/... To prevent this, generate all your transforms before page load with the generateTransformsBeforePageLoad config setting:

'generateTransformsBeforePageLoad' => true

Answered by James Smith on July 1, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP