Navigation:  User Interface > Project Settings > Source Code Page >

Compression

 

Previous pageReturn to chapter overviewNext page

The "Compression" tab can be used to designate which portions of your source code should have unnecessary characters deleted. By reducing the size of the code, you will increase the speed of loading while also making the code harder for outsiders to understand. Because only portions that are unrelated to the presentation are removed, compression has no effect on how the pages appear in a browser.

First, select at the top the code portions that you want HTML Guard to compress. You can use the program to optimize pure HTML code or also CSS (Cascading Style Sheets) and JavaScript code within your files.

Then use the lower portion to select which measures you want to apply.

Remove unnecessary spaces

Removes spaces, line feeds and tabs that improve the appearance of the source code but are not needed to display the page.

Remove comments

Removes comments like the following HTML comment from the source code: <!-- Comment -->

Remove unnecessary quotation marks

Deletes any quotation marks (" or ') in HTML tags, as long as doing so would have no effect. For example, this code: <a href="test.html"> would be shortened <a href=test.html>.

Please note that the resulting code can be processed by any browser, even though it is not 100% compliant with the HTML standard.

Remove empty tags

Removes HTML tags with no content, as long as this has no negative consequences. For example, the code <b></b> is completely unproductive and can therefore be deleted without any harm.

Remove empty attributes

Removes attributes without any content from HTML tags. For example the "alt" attribute in <img src="picture.png" alt=""> has no effect and can therefore be deleted.

Shorten HTML character entity names

Replaces certain entity names with equivalent, shorter, entity numbers. For example, &Ntilde; becomes &#209;.

Shorten color names/codes

Replaces certain color names in HTML code with equivalent, shorter, color codes. For example, lightgoldenrodyellow becomes #FAFAD2 and #FF0000 becomes red.

Shorten HTML tags

Replaces certain HTML tags with equivalent, shorter tags. Under Configure, you can designate which tags you want to shorten.

However, if you have set formatting for those particular tags with CSS, you should not use this option. A format template that recognizes the <strong> tag would lose its effect if the tag were changed to <b>.