Cornerstone 0ce70e6.js google warning: avoid serving legacy javascript to modern browsers

Google page speed insights (https://developers.google.com/speed/pagespeed/insights/) is flagging all of /cornerstone/assets/dist/js/site/cs.0ce70e6.js files for serving legacy JavaScript to modern browsers. In addition, that js library is about 150kb, its huge! I tried deferring it to boost loading speed but then the menu stops working.

Please advise as a theme update is required to eliminate the warning and do address its size and ability to defer. My website is irrelevant for this.

Hey @Bark201,

Thank you for your feedback. I’ll post this in our issue tracker so it will be queued for investigation by our development team.

I believe our development team is aware that the base JS file size should be small and they’re working hard to achieve that while maintaining the functions available in our themes and builders. That’s evident with the beta version that I’ve tested. The JS file is a bit smaller than the latest version.

Regarding deferring the script, there’s no need for that as all our themes’ and builders’ JS files are loaded in the footer. If you defer them by external means like using an optimization plugin, it will change the order of execution so there’s a high chance it will break the theme’s functions.

Hope that helps and rest assured that our development team is working to improve our products over time.

Thank you for the update.

You are most welcome!

Hi @Bark201

I wanted to chime in here about this. Most of that bundle size is related to older theme features, and polyfills to support legacy browsers. For the next release (Cornerstone 5.0) we’ve made some very small adjustments to start moving away from using jQuery as much as we have been.

Regretfully it won’t be until the next update (Cornerstone 5.1) but we are going to take some time to revisit how our assets are bundled and look for ways to streamline performance.

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