We use cookies
We use cookies to optimize our website. By continuing to browse the site, you agree to our use of cookies.
New design
Control panel
  • Русский
  • Українська
  • English
  • UAH
  • USD
  • RUB
  • EUR
  • 0-800-307-307 Hotline
  • +38 (044) 392-74-33 Kiev
  • +38 (057) 728-39-00 Kharkiv
  • +38 (056) 794-38-31 Dnipro
  • +38 (032) 229-58-93 Lviv
  • +38 (048) 738-57-70 Odessa
  • +38(093) 170-15-42  Life
  • +38 (067) 400-88-44 Kievstar
  • +1(888)393-24-51  USA, Toll free
  • +44(131)507-01-14  Great Britain
  • +7 (499) 348-28-61 Moscow

2.19.1. Website optimization settings (PageSpeed)

The site optimization settings use the Google PageSpeed module filters. It is installed on the hosting by default and is designed to speed up the display of the page in the browser. The documentation for this module is available at official website.

Content

Website speed is one of the most important factors that modern visitors pay attention to. Site display delays cause annoyance, negatively impact search engine rankings, and reduce revenue for commercial sites. From the point of view of the visitor, the speed of the site is influenced by two main parameters: the speed of page formation on the server and the speed at which the page is displayed by the browser. To speed up the formation of pages on servers, we use modern equipment and fine-tuning software. Also, our clients have access to tools that allow us to speed up the speed of displaying the page in the visitor's browser, just by making changes to the settings of their site.

Most of the time when the browser displays the page, it takes up loading additional page elements - images, JavaScript and CSS... Almost all themes for popular CMS use a JavaScript framework with a dozen plugins and many CSS-styles. At the same time, the total amount of data uploaded by the visitor often exceeds 500 KB, and the number of requests to the server to display one page is several dozen. This negatively affects the page loading speed of the visitor.

There are several techniques that can be used to increase the speed of displaying the site in the client's browser:

  1. Reduce the amount of transmitted data.
  2. Reduce the number of requests to the server.
  3. Configure caching of static files in the browser.
  4. Optimize page rendering.

You can reduce the number of requests to the server, the amount of transmitted data and the efficiency of their compression by combining several files into one and removing unnecessary comments and spaces. If your site has a lot of graphics at the bottom of the pages (which is visible only when scrolling), lazy loading of images can be useful. To speed up page rendering, you need to configure the correct connection order CSS- and JavaScript files, and possibly transfer small CSS in HTML-code. If the pages actively use elements from other sites (traffic counters, social media widgets, online help chats), preliminary resolution DNS-the names of these resources can improve their loading speed in modern browsers. You can perform this kind of optimizations using PageSpeed settings... All optimizations are performed “on the fly”, without the need to make changes to the site code.

The PageSpeed module also works over the HTTPS protocol. When the site is configured redirect from HTTP to HTTPS (or vice versa) using .htaccess, there may be problems with the processing of content by the PageSpeed module over HTTPS. To fix the situation, you need to remove the redirect directives from .htaccess and instead enable the required redirect in the site settings.

Caching allows the browser to save a copy of the static file on the visitor's computer and not ask the server for it on a second visit. However, this creates inconvenience to developers, since visitors will see changes in these files with a delay for the duration of the cache. To avoid this problem, PageSpeed provides advanced caching options for images, styles, and scripts. If used in URL static files, a hash of their content is added, which changes when the file is edited. Thus, long-term caching is achieved with the ability to freely make changes.

Important points:

  • You can determine which settings are suitable for the site experimentally, one by one including them and checking the work of the site at each stage. Some of the settings may interfere with the normal operation of the site. For example, after enabling minification or JavaScript aggregation, interactive elements may stop working on the site (no buttons will be pressed). This means that the setting is incompatible with this site. In this case, it should be disabled by unchecking the checkbox, and clear cache PageSpeed.
  • The effectiveness of the settings directly depends on how the site developers approached its optimization. For an initially well-optimized site, customizations may be overkill.
  • Some PageSpeed filters can create additional server load. By generating optimized files, the module generates many requests to the server. For the most part, requests are aimed at static content and their processing should not cause a load on the server and problems, but in some cases, requests can be directed to the generated content by PHP scripts and thereby create a large load (this scenario is extremely rare, but it takes place).
  • PageSpeed optimization filters do not modify files on the server, so after them disconnections the site will return to its previous state.
  • The PageSpeed module has certain nuances of work; to familiarize yourself with them, you should familiarize yourself with the documentation on official website.
  • Some merge modules have a MaxBytes limit at which files will not be merged beyond this size. On hosting, the MaxBytes value is 1kb.

To configure PageSpeed, do the following:

  1. Openup site settings.
  2. On the tab “Website optimization settings"Check or uncheck the boxes next to the required options and click"Save»:
  3. Wait approximately 15-30 minutes for the changes to take effect.

Rules for specifying exceptions

  • URL you need to specify without the name of the site itself, for example */jquery.js or */static*.
  • Directories must be framed with two characters *, eg */content*.
  • Each exception is listed on a new line.
  • One exception must not exceed 100 characters.
  • Available symbols: a-z 0-9 - . _ / *.

To add URL into PageSpeed exceptions, do the following:

  1. Openup site settings.
  2. On the tab “Website optimization settings" in field "Exceptions from PageSpeed»Enter URLto be excluded and click "Save»:
  3. Wait approximately 15-30 minutes for the changes to take effect.

To clear the PageSpeed cache, do the following:

  1. Openup site settings.
  2. On the tab “Website optimization settings"At the bottom of the page click"Clear cache»:

To completely disable PageSpeed, do the following:

  1. Openup site settings.
  2. On the tab “Website optimization settings"Uncheck all the options and click"Save»:
  3. Wait approximately 15-30 minutes for the changes to take effect.