for (1) you’ll have to exclude the layerslider JS from JS optimization (plugins/layerslider/
)
for (2) you’ll have to exclude those image from being lazyloaded (either in the lazyload settings or by adding skip-lazy
to the image class.
hope this helps,
frank
Thread Starter
saad23
(@saad23)
Hi,
I had already added these exceptions to make the LayerSlider work on the desktop:
wp-content/plugins/LayerSlider/assets/static/layerslider/js/layerslider.kreaturamedia.jquery.js?ver=6.11.2
wp-content/plugins/LayerSlider/assets/static/layerslider/js/layerslider.utils.js?ver=6.11.2
Now, I added this line as you said:
wp-content/plugins/LayerSlider
But there’s no change on mobile site. Should the exception path end in “.js”?
Should the exception path end in “.js”?
no; wp-content/plugins/LayerSlider
excludes the entire layerslider directory
But there’s no change on mobile site.
try excluding js/jquery/jquery.min.js
from JS optimization?
Thread Starter
saad23
(@saad23)
That is already excluded. Full list of exclusions:
wp-includes/js/dist/
wp-includes/js/tinymce/
js/jquery/jquery.js
js/jquery/jquery.min.js
wp-content/plugins/LayerSlider/assets/static/layerslider/js/layerslider.kreaturamedia.jquery.js?ver=6.11.2
wp-content/plugins/LayerSlider/assets/static/layerslider/js/layerslider.utils.js?ver=6.11.2
wp-content/plugins/LayerSlider/
seems you’re still having “jQuery is not defined” errors, so something is up here. what are your current JS optimization settings?
Thread Starter
saad23
(@saad23)
I currently have these options “On”:
Optimize JavaScript Code?
Do not aggregate but defer?
I’m using jQuery Migrate Helper plugin, is that an issue?
so what happens if you enable “aggregate JS” with the earlier mentioned exclusions?
Thread Starter
saad23
(@saad23)
The same issue occurs. Desktop site is perfect but in the mobile site the LayerSlider is gone.
The “Services” and “Testimonials” (also on the home page) are also gone.
can you configure it as follows and leave as such for me to investigate;
* “aggregate JS” on
* JS exclusions js/jquery/, wp-content/plugins/LayerSlider/
* “minify excluded JS/ CSS” off
Thread Starter
saad23
(@saad23)
Done. I have removed ALL of the other exclusions and set it as you asked.
Edit: Mobile site looks fine under these settings. The optimization isn’t much though.
-
This reply was modified 2 years, 12 months ago by saad23. Reason: Added point
Edit: Mobile site looks fine under these settings.
great
The optimization isn’t much though.
what tool do you use to assess performance? what does that tool highlight as issues?
Thread Starter
saad23
(@saad23)
what tool do you use to assess performance?
I use PageSpeed Insights.
If you wish to see the results:
https://developers.google.com/speed/pagespeed/insights/?url=parkardentalcare.in
If I remove the “do not aggregate but defer” and “lazy-loading” options my score comes down to ~40 from ~70.
Before I installed this plugin my score was a paltry 30.
Thanks for trying to help.
what does that tool highlight as issues?
“Eliminate render-blocking resources, Remove unused JavaScript, Reduce initial server response time”
I had managed to make:
First Contentful Paint <2 secs
Largest Contentful Paint <3 secs
Before I realized mobile site isn’t working properly.
-
This reply was modified 2 years, 11 months ago by saad23.
OK, so in order of importance;
-> server response time: AO does not do page caching, consider installing a page caching plugin such as Speed Booster Pack or KeyCDN Cache Enabler or WP Super Cache
-> render-blocking resources; give “inline & defer CSS” a try, there’s more info in the AO FAQ
-> unused JS is not something AO can help with, AO combines & minifies the JS but does not know what JS is used on a given page, try reducing the use of JS (by disabling any plugin you don’t absolutely need)
hope this helps 🙂
frank
Thread Starter
saad23
(@saad23)
Okay thanks so much for the advice and help.
Cheers!
you’re welcome, feel free to leave a review of the plugin and support here 🙂
enjoy your weekend!
frank