Jump to content


This topic is now archived and is closed to further replies.


How to disable unused footer scripts like parallax, fitvids, waypoints etc. for best performance?

Recommended Posts


In the footer of my site there is:

<!-- Footer Scripts -->
<script type='text/javascript' src='http://malmgord.dev/wp-content/themes/dms/js/script.bootstrap.min.js?ver=2.2.2'></script>
<script type='text/javascript' src='http://malmgord.dev/wp-content/themes/dms/js/script.resize.js?ver=1.1.6'></script>
<script type='text/javascript' src='http://malmgord.dev/wp-content/themes/dms/js/script.viewport.js?ver=1.1.6'></script>
<script type='text/javascript' src='http://malmgord.dev/wp-content/themes/dms/js/script.waypoints.js?ver=1.1.6'></script>
<script type='text/javascript' src='http://malmgord.dev/wp-content/themes/dms/js/script.easing.js?ver=1.1.6'></script>
<script type='text/javascript' src='http://malmgord.dev/wp-content/themes/dms/js/script.fitvids.js?ver=1.1.6'></script>
<script type='text/javascript' src='http://malmgord.dev/wp-content/themes/dms/js/parallax.js?ver=1.1.6'></script>
<script type='text/javascript' src='http://malmgord.dev/wp-content/themes/dms/js/pl.common.js?ver=1.1.6'></script>
<script type='text/javascript' src='http://malmgord.dev/wp-content/themes/dms-child/sections/navbar/navbar.js?ver=1.1.6'></script>

Two questions:
1. Why is DMS loading i.e. parallax.js when I'm not using it? Are there plans to optimize it so that only scripts that are needed by sections currently on the page are loaded?
2. How can I disable the ones I'm not using? Probably somehow in my child-themes functions.php?



Thanks! :)

Share this post

Link to post
Share on other sites
James B

Hi there,


As far as I'm aware these scripts can be used inside certain sections or section areas so they'll load in the footer area after the main page content has loaded. Scripts will only be loaded if they're essential or required on the page, when developing the core team work on the basis that the theme only loads what's required. They'll be improvements in future editions as the theme moves forward.


You can disable any scripts using the hook provided in this link http://forum.pagelines.com/topic/30739-can-fitvidsjs-be-disabled-from-the-theme/

Kindly search the forum and read the documentation before posting. It will help you resolve many issues.

For CSS help be sure to check out W3Schools first and be sure to download FireBug for FireFox for troubleshooting.

James B

Share this post

Link to post
Share on other sites

Scripts will only be loaded if they're essential or required on the page, when developing the core team work on the basis that the theme only loads what's required.

So does this mean that loading unnecessary scripts is a bug and it's being worked on at some point?

That's good. Thanks. And until then I can use function you linked.

Share this post

Link to post
Share on other sites

  • Similar Content

    • Paul
      By Paul+
      I was surprised to see I had no menu today - out of the blue - its actually moved to the bottom of the page!  After hours of fiddling and disabling every single plugin, leaving just plagelines the issue is still present.  See video for a basic text box - I moved it into the head and it jumps to the bottom and shows just above the footer but below the main content.  I have a temp fix by placing the menu into the first row on the main content but it does mean other than my home page, all other pages have no menu.  A quick fix is very urgent for this bug.
    • tuciudadenred
      By tuciudadenred+
      Hi everyone, what happens is that the web page metrosalarmas.com has a google tags which I have not attacked where I can look to remove those tags and be able to locate the correct ones.
    • flourishdesignstudio
      By flourishdesignstudio+
      I am having an issue with the Lax sections on Platform 5. I can embed a widget or text box into a Lax section which is really neat, but the image in the background (the parallax image) seems to get stretched and doesn't scale in an attractive way.  For example, the page http://ed6.61e.myftpupload.com/#clients has a parallax section with a woman's face  and I thought is would scale as the browser window gets smaller but the zoom-level never changes. Also, the amount of parallax shift seems more dramatic than what we want. I thought that if I uploaded a shorter image it would scan/scroll less since the height from the image's top to bottom would be less. However, that doesn't seem to have any effect and I am at a loss of how to properly control the way the image is displayed within that box. Any thoughts, tips, or suggestions to get me pointed in the right direction?
      Thanks so much for the help!
    • globalnative
      By globalnative+
      Hi there! 
      I'm wondering if I can and how I can easily make a one page scrolling parallax site with menus which scroll rather than take me to a new page?
      Something like this: http://demo.vellumwp.com/home-pages/one-page-resort/.
      Thank you kindly
      PS: my site: http://natemaingard.com
    • Houston Haynes
      By Houston Haynes+
      OK - folks - back with another nit... The "back to top" link works - BUT - it's only active (i.e. clickable with the associated action following) when the mouse-over hovers over the footer area of the page. I did a quick change of the z-depth (to -1) and nothing made a difference. Any thoughts on how to make the *entire* back-to-top icon hover-able/actionable? Thanks!