Hello,
Most of us when building sites that rely on their speed to get better google ranking, are concerned about the useless includes that load without meaning the pages. One of this case I notice is the inclusion of revolution slider includes
https://pathologia.eu/wp-content/plugins/revslider/public/assets/js/rs6.min.js?ver=6.5.9
In each and everypage – actually this useless js (for all the pages in the site that I am interested) – accounts for the most traffic by a single element. I use revolution slider not in the homepage, but in a page that account of 0.01 of the visits.
I would like only the pages that actually have revolution slider to have this code (together with the css etc) included.
Is there a way to do this without breaking the theme after updates?
Thank you!
Dimitris
Just to get an idea of the issue here is the contribution of the revslider in my sites traffic:
The temporary solution was to issue an instruction like this (522 is the only page that contains the rev slider)
if (is_page(522)) {
on line 90 of the wp-content\plugins\revslider\public\revslider-front.class.php
And this gets rids of a whole of junk while it considerably improves the pages ranking on the Google PageSpeed
Here is the response I just got from themepunch – the makers of Revolution Slider:
Thanks for the update. Under the slider Global Settings section you can disable JS libraires inclusion and apply it only for pages where the slider is. In the approprite files you will need to add page IDs.
Hope this helps.
Yes, what I meant is that in spite of what they said before that by selecting this option in global settings, it will stop append their code in irrelevant pages, this does not work.
And not only that but even with my change, the code shows up. So, I had to downgrade to 6.5.9 because I was too busy to patch their new version as well.