Performance


For websites, the term performance refers to the loading speed or the computing power of a server, in other words, the speed at which data is transmitted from server to client.

Reasons for good performance

A website that loads slowly, may encourage potential customers to abort. To ensure smooth interaction, something should be done proactively for good performance. Especially with the increasing use of mobile devices, a positive impression through unobtrusive, fast loading is important to convert visitors to customers. When a page loads slowly, the visitor may bounce and then click the search result of a competitor. The performance of a website has gained in importance because websites are getting larger and the networks are getting slower through higher loads.

Advantages of good performance

Smooth interaction with a website keeps visitors there and creates trust. Simultaneously, operating costs can be reduced. Better performance also means reduced site speed which can have a positive effect on search engine ranking.

Optimization options

There are many ways to improve the performance of websites. There are just a few listed here which can account for a few seconds. Not every method would be advisable for every website, which is why it should always be checked before execution whether or not the effort will pay off.

Use of the browser cache

It is possible, to cache files, i.e. store them in a buffer on the client side. For example, if an image gets stored in the cache upon the first visit to that page, it can be loaded from there for the second visit. The page will load faster because the image does not have to be transferred. Caching is only useful for files that do not change frequently. A corresponding entry must be made in the .htaccess file to get this executed.

Previous compressing with gzip

Another way to reduce the loading time is compressing the data before it is being sent by the server. This is done using gzip in the .htaccess file. HTML, CSS, JavaScript and other file types can be compressed. Additionally, whitespaces and comments can be removed before that. The receipt of such a compressed page is supported by current modern browsers. It is possible to cut the loading time in half with gzip.

Reduction of HTTP Requests

Each page element is an HTTP request. A browser can load between two and eight of these elements at the same time, all others go into a kind of queue. Thus, it takes longer to load a page completely, regardless of the available bandwidth.

  • The number of HTTP requests can be reduced by combining certain page elements. Frequently used graphics can be combined into one unit, which would be recommendable for navigation elements as an example. This principle is called CSS sprites because CSS is used to describe when and which items are visible. JavaScript is another option.
  • Multiple CSS files or JavaScript libraries can be combined into one.
  • Additionally, old, unnecessary files can be removed to further reduce HTTP requests. Elements without function are unnecessary and only cause unnecessary requests.

Another advantage of less requests involves the fact that each file has its own header. It has to be sent with each request and therefore grouping of graphics or CSS files makes sense.

Keep the file sizes small

To reduce the overall data quantity to be transmitted, files should be kept small. Increased bandwidth is not an argument, because at the present time visits with mobile devices must be reckoned with.

  • One way to reduce file sizes is to avoid repetitions. Both CSS and JavaScript code often contains paragraphs that occur elsewhere again. If these are skillfully placed into external files, any repetitions and thus the file size can be reduced.
  • Control characters present another way to reduce file size. A programmer ideally respects the readability of the code, therefore including tabs, blank lines, and line breaks. These are characters that are unnecessarily transferred. Special tools allow you to automatically rid CSS, JavaScript or HTML files of superfluous characters. The resulting version is hardly usable to work with, but it is smaller than the textured version and therefore more suitable for sending.
  • Graphics offer a lot of potential for space savings. The file size can be greatly influenced by intentional reduction in quality. The format can be selected when saving, the size should be exactly that in which the graphic is displayed, and during compression, the parameters which impact the file size can be changed (JPEG 85% produces a smaller file than JPEG 100%).

Check cookies

Cookies also affect the performance. Any cookie and any information in a cookie should only exist if it is useful. For example, the collection and transmission of data which will actually not be used can be dispensed with.

CSS selectors

Small improvements can also be made to CSS stylesheets. The reason is that CSS selectors have different processing times. Highly suitable are ID (#) and class (.). However, the wildcard selector (*) and the descendant selector (>) are slower. Another small factor is the @import command, which may block further loading in some browsers until the imported file itself is loaded.

Relevance to search engine optimization

Site speed ​​is a confirmed ranking factor and therefore performance is essential from an SEO perspective. Moreover, visitors quickly leave pages that load slowly. It can come down to milliseconds. Large websites have often tested the impact of performance on customer behavior. Amazon, for example, intentionally delayed the loading time of the product pages by 100ms. As a result, sales decreased by one percent.

In a study by Yahoo, loading of the homepage was delayed by up to 400ms, with the result that nine percent of visitors closed the page before loading was completed. The shopping search engine Shopzilla cut its loading time by 3.5 seconds through performance optimization. Revenues increased subsequently by twelve percent. The optimization of performance therefore happens as part of search engine optimization. For comparison, it would be advisable, to evaluate competitor websites with the appropriate tools as well. Google Insights is one tool that can be utilized. A URL which is being tested with regard to site speed can be specified. The tool will then generate proposals, as to how the loading speed can be improved.