July 1, 2016 at 1:57 am #18509MatthewCustomer
While optimizing the theme for speed, I noticed genesis slider loads in every page even though we only use it for the homepage.
To make the user experience more enjoyable (and get a better Google Pagespeed ranking), I thought it might be good dequeue’ing the js and stylesheet of the slidershow to only load in the homepage.
This is the code I have so far, but it doesn’t seem to be working;
Can you spot anything that I might have missed?
CheersJuly 2, 2016 at 11:11 pm #18534WesModerator
Oh wow I didn’t know it loads on every page…..(maybe I have in the past but forgot since it’s been a while). I just checked the demos on the sites that I’m using it on and I’m just now noticing it showing up in the code. I’ll have to investigate to see how to get it to work on just one specific page.
If I don’t find anything, then I’ll probably need to reach out to the Devs to see if they have a quick way to do it.July 3, 2016 at 7:02 am #18544MatthewCustomer
Yeah, I remember disabling Genesis slideshow on my website a few years ago as I was having the same issue. Small extra files like that really make a different for overall site performance and user experience.
I’m a bit of fickler for performance and speed after my experience of optimizing my sites speed down to a 1.5 second load time and going from 5k unique hits per month to 20k and ranking for a few dozen terms.
Do you think the code above might work if written properly? I based it on Justin’s article: http://justintadlock.com/archives/2009/08/06/how-to-disable-scripts-and-styles and I know I’m probably missing just a silly detail.
I look forward to seeing what you find.July 7, 2016 at 11:38 pm #18617WesModerator
I’m not sure if it will work or not. To be honest, this could get answered much faster by contacting the Developers/Creators of this Plugin to see if they have a better solution. Since I haven’t created the plugin, I’d highly recommend contacting the Plugin Developer to see if they have a shortcut/way to get this working. I don’t want to lead you down the wrong path with the wrong solution 🙂
Let them know what you’re trying to do, and they should have a solution for it. I assume this question has been asked before, so let’s hope there’s a way!
- You must be logged in to reply to this topic.