VWO Logo
Dashboard
Request Demo

Back to All Updates

Minify Your Custom JavaScript/CSS Code

Anshul Gurbaxani Anshul Gurbaxani 2 Min Read

Minification is the process that removes whitespaces, comments, and optimizes/shortens a few common programming patterns, and newline characters. Since these characters only add readability to the code and don’t actually execute, removal of these doesn’t break anything on your website. Everything works as is and the final size of the code is smaller than the original.

We’ve introduced the Minify JavaScript/CSS Code feature in VWO Code Editor to enable you to minify the variation code directly in VWO. This helps reduce the size of the code for the changes and reduces the data to be loaded for all the visitors that become a part of the test.

CAUTION: If you are using global variables in your code, minification might modify them. Hence, we recommend you to test your code first before using this feature.

You can configure this setting both at the account and campaign level.

  • Account-level change for all future campaigns: To configure this setting at the account level, go to Account settings > Campaign settings, and from the Minify JavaScript/CSS code present under the Editor settings section, choose the option relevant for you (this applies to all the campaigns that are created after you make this change).
Minify
  • Campaign level: To configure this setting at the campaign level, click on the settings option in the code editor, and enable the Minify JavaScript/CSS code option.

If you have configured this option both at the account and campaign level and the settings differ, then the campaign level configurations take precedence. Each new campaign created will default to account-level configuration.

Minify

Note: You will continue to see the code as it is (with your formatting) but we will minify it before serving it to the customers. This will ensure that the code is readable for you, and executes faster when needed.

To learn more how to configure this in VWO, refer to Minify JavaScript/CSS Code in VWO

Products
VWO Platform
Plans
Growth, Pro, Enterprise, All
Tags
Performance
For questions/concerns
support@vwo.com
Share

Subscribe for VWO Product Updates

Be the first to know. Stay on top of the latest VWO features and releases. You will also be invited to try our exciting beta features in the works!

A value for this field is required.

Thank you!

Check your inbox for the confirmation mail