Slow Web Speed? Speed It Up In 4 Simple Steps.

programming Posted on Jul 14, 2016

Don't let slow web speed happen to you. American consumers are notoriously fickle and bounce within seconds of hitting a blank screen. Which if your website is the first point of contact with the public, could negatively affect your business. Here are some tips to keep your load time low and consumer engagement high.

Keep in mind the right tactic depends on your goals, so using each one in every situation may not be prudent. Nevertheless these best practices give you an idea of how the advanced programmers at XenoPsi troubleshoot specific issues and objectives.

Enable GZIP Compression

Enabling GZIP compression can dramatically increase your website's speed.

GZIP compression is a server setting that finds all repetitive strings and replaces them with pointers to the first instance of that string. This reduces the file size and makes your website lightweight. It works with HTML code, CSS and JavaScript files especially well because they are repetitive in nature. In some cases enabling GZIP compression can reduce the file size by up to 85% and thus make your website load a lot quicker.

To enable GZIP compression, you either need to modify your .htaccess file (Apache) or add the required settings to your web.config file (Windows IIS).

Now that you've enabled GZIP compression, it's time to make your website leaner.

Enable Minification & Reduce HTTP Requests

According to Yahoo Developer Network best practices, downloading page components takes up 80% of a website's loading time. The more components there are, the slower your site becomes. Enabling minification and reducing the number of HTTP requests will help to make your site leaner so that browsers could load it faster. To do that, you need to combine all JavaScript files into a single file. The same applies to CSS files.

Minification is a process that makes everything smaller. It removes whitespaces, reduces the length of your hex codes, gets rid of comments and semicolons that are not required, etc. While whitespaces and comments are very useful during the development phase, they make the code larger and heavier. That's why you should remove unneeded data that slows down your website and wastes bandwidth when you are done with the development.

There are several tools that can automatically minify, combine and serve CSS and JavaScript files for you. We recommend using Google's Minify tool because it does a great job applying minification and reducing the number of HTTP requests automatically. You can download Minify from GitHub.

Make Your Images Smaller

If you've ever tried emailing photos without resizing them first, you know how long it takes to attach them. The same goes for websites - large uncompressed images make them a lot slower.

Luckily, it's easy to optimize the images on your website. First of all, never use full-sized pictures and remember to upload cropped and resized images for your thumbnails and featured images.

Secondly, apply lossless compression to your images. You can do that with the help of ImageOptim and TinyPNG. These tools will reduce image size without any loss of quality whatsoever.

Cache Your Website & Enable KeepAlive

Your website consists of lots of different elements that are typically located on several different servers. This means that your visitors' browsers need to collect all these elements and put them together before they display your page. This is a bit like cooking a meal - preparing all the ingredients takes time.

About 40–60% of your visitors come to your website with an empty cache, so it's absolutely vital to make your page fast for these first-time visitors. But you should also enable caching to make your site load quicker for returning visitors.

Caching your site will speed things up because it will pre-assemble your site on the server so that your visitors can load it really quickly. It works like ready-made food - you can serve straight away.

In addition to caching, you should enable KeepAlive. HTTP is a transaction-based that makes a connection to transfer a single file and closes it once the transfer is complete. This keeps things simple but it’s not very efficient in terms of website speed. To improve the efficiency of HTTP transfer, KeepAlive was introduced. With KeepAlive the Web browser and the Web server agree to reuse the same connection to transfer multiple files, thus making the transfer faster. You can configure KeepAlive on an Apache server using the .htaccess file.

We hope that these simple steps helped you to increase your website's speed and performance. Go ahead, measure its performance again and enjoy a much better PageSpeed and YSlow score.

BACK TO BLOG