Clean & Indent the Generated Source Code
Are you interested in the HTML code that our editor generates? Do you like to keep your code nice and clean? Then the Optimize Source Code option is for you!
Before enabling this feature, the code output by the editor is extensive and has a lot of inline scripts. When enabled, the code is indented for better readability, and the inline scripts reduced to the minimum, sending the extra code to external files.
How to Enable it
Go to the shelf at the bottom and click on More and select URL & Custom Tracking Code.
On the panel that opens, check the box for “Optimize Source Code” right above the custom code section.
In order to visualize it, your site must be already published. Then, for it to take effect, you must manually push this update by clicking on the Publish Changes button on the shelf.
Before and After
Want to take a look at how the code is optimized? The following is a “before” optimization screenshot.
And here’s what it looks once optimized:
Where do I find the source code?
Every modern browser has an option to visualize the source code of the page you’re currently viewing. It varies from browser to browser, but there’s usually an option under the “View” or “Tools” menu called “View Source”.
Is it automatically generated?
If it’s the first time you enable it, no, you have to manually click on “Publish Changes” on the shelf to generate the clean code. Once you have this option checked, every time you make and publish changes, your code will be optimized.
Does it have any impact on my site?
It helps with SEO and source code readability. It doesn’t have any negative impact, nor does it slow down the loading of your site.
Something missing? Let us know in the comments!