Remove revolution slider includes from each and every page!

Posted in: Newspaper
Post count: 162

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

Post count: 162

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

Post count: 35449

Hi dimitrisv,
Indeed, for the situation that you explain the fix/idea that you provided it seems to work correctly, at least form my tests.
Thank you for sharing with us!

Post count: 162

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.

Post count: 27744

Hello,

Thank you for sharing this information.

Have a nice day!

Post count: 162

I updated to rev. slider 6.5.10 and sadly the issue re-appears (with my code removed) in spite of the fact that I have specified it to work on a particular page.
They just place the includes in the footer!!!

Post count: 27744

Hello,

If made the update, all the changes that you made in the files will be overwritten and you need to make again the changes.

Thank you!

Post count: 162

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.

Post count: 162

ΟΚ. Just to let you know that they fixed it on the latest version 6.5.11.

Just make sure that in the global settings the “”Defer JS Loading” is checked!

Post count: 162

Here is the setting:

Post count: 27744

Hello,

Thank you for this information.

Have a nice day!

Viewing 11 posts - 1 through 11 (of 11 total)
The forum ‘Newspaper’ is closed to new topics and replies.