Trying to clear Javascript errors

I’m still trying to narrow down what is exactly causing these javascript errors and long load times.

So piggybacking on this previous topic of mine about Javascript:

I had enabled Smushy’s Lazy Load feature because I’m having big issues with images on my website really dragging down the load time of my website and Support has disabled it as the root cause of other loading issues I was having on the website with thumbnails missing and embedded videos players not working.

So how can I enabled Lazy Load in order to optimize all of the images on my site without affecting the Javascript?

I ran this website test:

And it is showing significant Javascript errors when it comes to the Modern Events Calendar and Revolution Slider plugins.

Why are these plugins causing such Javascript & loading errors and what can I do to fix them?

Hey John,

Plugins load scripts either in the head or in the footer to make their features work. You can install a performance plugin that can defer and even remove scripts from being loaded. We can’t recommend plugins for that as it varies per project. And, that is beyond the scope of our support service as that could break your site. You will need to hire a website optimization expert if you don’t have time to experiment with optimizing your site.

I understand that this is frustrating but there’s nothing we could do for this case. Deferring and removing scripts requires the installation and configuration of various optimization plugins. That is not part of our product support.

I hope you understand.

Ok, well let me ask this, perhaps I’m not adding things like Rev Slider & MEC to my home page properly.

I created a new Section and add a “Text Box” to it and then add the Rev Slider shortcode: [rev_slider alias=“Main Ads”]

Is this the proper and most efficient way to add the Rev Slider to sections on my home page?

It seems however I’m adding these plugin modules is severely affecting the way my website loads.

If this continues I’m just going to have to disable them all together and find other solutions.

Google says this at this link:

https://developers.google.com/speed/docs/insights/BlockingJS#deferJS

What if I’m using a JavaScript framework to construct the page?

If the content of the page is constructed by client-side JavaScript, then you should investigate inlining the relevant JavaScript modules to avoid extra network roundtrips. Similarly, leveraging server-side rendering can significantly improve first page load performance: render JavaScript templates on the server to deliver fast first render, and then use client-side templating once the page is loaded.

So what should I be doing to “inline” these javascript modules properly so they render in the right order?

Hey John,

Where you add Slider Revolution on a page doesn’t matter. It’ll still load the scripts that it needs. I am very sorry though that I forgot that Slider Revolution has a Defer Scripts and Load in Footer setting. You can also disable the loading of scripts globally. Those scripts should be enabled with caution though as it sometimes breaks the slides functionality. If it does, regretfully, you need to turn the options off or on depending on what works for your site.

-----------------------------------------------------------------------------------

For MEC, regretfully, there’s no option like that.

Thanks.

Ok so I turned both of those features on and everything seems to still be working like normal, so I guess I will leave both of them on for now.

Where do I disable the loading of scripts globally?

Is there another way for me to have a scrolling slider besides RevSlider for banners and stuff that isn’t so resource heavy when loading my home page?

Hello John,

The “Include Libraries Globally” option is already turned OFF as shown in your screenshot.
I am not sure which slider you are referring to. I think you mean adding a navigation sliding thumbs for your slider?
Please clarify further.

Thanks.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.