Skip to content

HTML Compression/GZIP  #28

@daryakuritsyna

Description

@daryakuritsyna

Page do not use any HTML compression!
You should compress your HTML to reduce your page size and page loading times - this will help your site retain visitors and increase page views. If you were using compression, you could be compressing your HTML size by 61 % - from 4.27 Kb to 1.65 Kb which would further reduce your page loading time.

Your two options for file compression are Deflate and GZIP.
Deflate is an option which comes automatically with the Apache server and which is simple to set up.
GZIP on the other hand needs to be installed and requires a bit more work to install. However, GZIP does achieve a higher compression rate and therefore might be a better choice if your website uses pages which have a lot of images or large file sizes.
Setting up file compression for your website will depend on which type of server you’re using for your website. Most likely, you’ll be using Apache, which means you can enable compression by adding a few deflate codes to your .htaccess file.

compress text, html, javascript, css, xml:

AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions