Javascript for Header elements (canva menu + mobile)

Hi,

Im using a cache and minify plugin called LiteSpeed Cache. When I combined JS to make my site faster, the canvas menu stops working. I have a field Called “JS Exclude” and I wonder how I can find the JS for that element.

Currently the site is running 22 JS without combined and minified, so when I combine them to one, it makes a huge impact.

Hey @Undrumen,

Pro has 3 already minified scripts loaded in the frontend and they are:

Loaded before </head>:

  • pro/cornerstone/assets/dist/js/site/cs-head.js

Loaded before </body>

  • pro/cornerstone/assets/dist/js/site/cs-body.js
  • pro/framework/dist/js/site/x.js

Some of the code in those files are jQuery dependent so jQuery is required to be loaded in the <head> before the cs-head.js

There’s a chance that the JS code will break due to minification of an already minified file. The said files should also be loaded in same area and in order therefore it’s best that you exclude those files. You should contact the optimization plugin support to learn how to exclude all resources of a theme or plugin.

This was also mentioned in our Performance Guide at https://theme.co/apex/forum/t/customizations-performance/210

If you wish to continue minifying and concatenating the theme scripts, you will need to consult with a third party developer as this is considered custom development as website optimization work is quite involved.

Hope that gives you enough information to continue with optimizing your site.

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