VEXXHOST Logo
Purple pattern background

Speeding Up Your Webpages Load Time

Mohammed NaserMohammed Naser

Remove spaces, tabs, CR/LF from the HTML source code
It's surprising how much people use tabs and spaces to make their code cleaner but what it does is add more pointless data to download which requires more data transfer which means longer download times. Try to not use a lot of HTML comments too. This alone can make your website faster from 7%-10%!

Minimize cookies
Of course, if you have a static site then you will have no problem with this. If your site is dynamic and uses cookies, I suggest using shorter values & names because cookies are added into each HTTP request which means longer transfer time. Try using “uname” instead of “user_name” and “pword” instead of “password”, etc. – Depending on your code, this can save from almost nothing to 10%.

Better Javascript
If you have long functions in Javascript such as “insert_to_database_and_remove_old_value” or you could name it “itdarov”. No one is going to care and your site will function never the less but you'll cut a bit of transfer time. Same “Remove spaces, tabs, CR/LF” applies to Javascript, usually there are a few programs called “Crunchers” which will remove all the enters, spaces, tabs, comments to make a final smaller sized javascript.

HTTP compression
Obviously, this one has ups and downs. Compression can make huge size differences because there is a lot of repetition in the source code, however it causes your CPU to have much higher load. It's a choice of high CPU load with small files or big files with no CPU load.

Force image size
If you add a picture to your website and the width/height are not specified, the client has to render the image a first time with no size, then once the whole page is downloaded, re-render it once again to decide the final size.

GIF/PNG compression
So, your page has several GIFs and/or JPG? It is very likely that those could be compressed even more without any loss! GIF/PNG mainly have a very compact data structure, but most applications like Corel Photo-Paint and Adobe PhotoShop don't optimize it well. Go and find yourself a good set of tools to compact your image files. You will be surprised that one of your GIFs had 900 bytes and after compacting it, end up being just 80 bytes.

How to Up Your DevOps Game with Project Gating: Zuul - A CI/CD Gating Tool

Download White Paper

Share on social media

Virtual machines, Kubernetes & Bare Metal Infrastructure

Choose from Atmosphere Cloud, Hosted, or On-Premise.
Simplify your cloud operations with our intuitive dashboard.
Run it yourself, tap our expert support, or opt for full remote operations.
Leverage Terraform, Ansible or APIs directly powered by OpenStack & Kubernetes