Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTML Compression/GZIP #28

Open
daryakuritsyna opened this issue Jul 29, 2015 · 0 comments
Open

HTML Compression/GZIP #28

daryakuritsyna opened this issue Jul 29, 2015 · 0 comments

Comments

@daryakuritsyna
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant