Removing redundant scripts/CSS

Hi team,

Part of my 2019 resolution is to speed-up my site as much as possible. I’ve been through the bigger/easier tasks (e.g. optimizing image sizes and removing plugins I don’t really need) and am now looking at the .js and CSS side of things.

So a couple of questions for you:

  1. Can I safely remove jQuery migrate, or do you guys use jquery-migrate.min.js for anything in Cornerstone or Pro?
  2. I’m guessing x-cranium-migration is to do with compatibility with older versions of X. Can I safely get rid of …/x/framework/legacy/cranium/dist/css/site/integrity-light.css ?
  3. Is there any other .js or CSS I can remove without breaking things?

Thanks in advance!

Hey Gee,

Generally, you should not be removing resources in the theme because it might break features when you need them. X, Cornerstone and Pro also loads resources only when necessary. We also do not support removing stuff in our theme nor what’s comes standard in WordPress.

I’m not saying that not removing stuff in the theme will not have any performance boost. It’s just that it is considered customization and it is the user’s responsibility to discover what he needs to remove for his site’s requirements.

Just in case you don’t know yet, I’d recommend that you focus on other areas to improve performance.

  1. jQuery migrate is part of WordPress and though it might not be needed, it might have other effects.
  2. That file isn’t loaded when it’s not needed. It will only be used if you’ll use the Integrity Stack. If you use Integrity then you’ll lose the stack’s styles if you delete it.
  3. This depends on what you need. Regretfully, this would require further consultation which is beyond the scope of our support. You would need to experiment on this yourself or consult with a third party developer. Also, issues that might arise from customization would not be covered by our support service.

Thank you for understanding.

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