This website uses cookies to better the user experience of its visitors. Where applicable, this website uses a cookie control system, allowing users to allow or disallow the use of cookies on their computer/device on their first visit to the website. This complies with recent legislative requirements for websites to obtain explicit consent from users before leaving behind or reading files such as cookies on a user’s computer/device. To learn more click Cookie Policy.

Privacy preference center

Cookies are small files saved to a user’s computer/device hard drive that track, save, and store information about the user’s interactions and website use. They allow a website, through its server, to provide users with a tailored experience within the site. Users are advised to take necessary steps within their web browser security settings to block all cookies from this website and its external serving vendors if they wish to deny the use and saving of cookies from this website to their computer’s/device’s hard drive. To learn more click Cookie Policy.

Manage consent preferences

These cookies are necessary for the website to function and cannot be switched off in our systems. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms. You can set your browser to block or alert you about these cookies, but some parts of the site will not then work. These cookies do not store any personally identifiable information.
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us to know which pages are the most and least popular and see how visitors move around the site. If you do not allow these cookies we will not know when you have visited our site, and will not be able to monitor its performance.
Cookies list
Name _rg_session
Provider rubygarage.org
Retention period 2 days
Type First party
Category Necessary
Description The website session cookie is set by the server to maintain the user's session state across different pages of the website. This cookie is essential for functionalities such as login persistence, ensuring a seamless and consistent user experience. The session cookie does not store personal data and is typically deleted when the browser is closed, enhancing privacy and security.
Name m
Provider m.stripe.com
Retention period 1 year 1 month
Type Third party
Category Necessary
Description The m cookie is set by Stripe and is used to help assess the risk associated with attempted transactions on the website. This cookie plays a critical role in fraud detection by identifying and analyzing patterns of behavior to distinguish between legitimate users and potentially fraudulent activity. It enhances the security of online transactions, ensuring that only authorized payments are processed while minimizing the risk of fraud.
Name __cf_bm
Provider .pipedrive.com
Retention period 1 hour
Type Third party
Category Necessary
Description The __cf_bm cookie is set by Cloudflare to support Cloudflare Bot Management. This cookie helps to identify and filter requests from bots, enhancing the security and performance of the website. By distinguishing between legitimate users and automated traffic, it ensures that the site remains protected from malicious bots and potential attacks. This functionality is crucial for maintaining the integrity and reliability of the site's operations.
Name _GRECAPTCHA
Provider .recaptcha.net
Retention period 6 months
Type Third party
Category Necessary
Description The _GRECAPTCHA cookie is set by Google reCAPTCHA to ensure that interactions with the website are from legitimate human users and not automated bots. This cookie helps protect forms, login pages, and other interactive elements from spam and abuse by analyzing user behavior. It is essential for the proper functioning of reCAPTCHA, providing a critical layer of security to maintain the integrity and reliability of the site's interactive features.
Name __cf_bm
Provider .calendly.com
Retention period 30 minutes
Type Third party
Category Necessary
Description The __cf_bm cookie is set by Cloudflare to distinguish between humans and bots. This cookie is beneficial for the website as it helps in making valid reports on the use of the website. By identifying and managing automated traffic, it ensures that analytics and performance metrics accurately reflect human user interactions, thereby enhancing site security and performance.
Name __cfruid
Provider .calendly.com
Retention period During session
Type Third party
Category Necessary
Description The __cfruid cookie is associated with websites using Cloudflare services. This cookie is used to identify trusted web traffic and enhance security. It helps Cloudflare manage and filter legitimate traffic from potentially harmful requests, thereby protecting the website from malicious activities such as DDoS attacks and ensuring reliable performance for genuine users.
Name OptanonConsent
Provider .calendly.com
Retention period 1 year
Type Third party
Category Necessary
Description The OptanonConsent cookie determines whether the visitor has accepted the cookie consent box, ensuring that the consent box will not be presented again upon re-entry to the site. This cookie helps maintain the user's consent preferences and compliance with privacy regulations by storing information about the categories of cookies the user has consented to and preventing unnecessary repetition of consent requests.
Name OptanonAlertBoxClosed
Provider .calendly.com
Retention period 1 year
Type Third party
Category Necessary
Description The OptanonAlertBoxClosed cookie is set after visitors have seen a cookie information notice and, in some cases, only when they actively close the notice. It ensures that the cookie consent message is not shown again to the user, enhancing the user experience by preventing repetitive notifications. This cookie helps manage user preferences and ensures compliance with privacy regulations by recording when the notice has been acknowledged.
Name referrer_user_id
Provider .calendly.com
Retention period 14 days
Type Third party
Category Necessary
Description The referrer_user_id cookie is set by Calendly to support the booking functionality on the website. This cookie helps track the source of referrals to the booking page, enabling Calendly to attribute bookings accurately and enhance the user experience by streamlining the scheduling process. It assists in managing user sessions and preferences during the booking workflow, ensuring efficient and reliable operation.
Name _calendly_session
Provider .calendly.com
Retention period 21 days
Type Third party
Category Necessary
Description The _calendly_session cookie is set by Calendly, a meeting scheduling tool, to enable the meeting scheduler to function within the website. This cookie facilitates the scheduling process by maintaining session information, allowing visitors to book meetings and add events to their calendars seamlessly. It ensures that the scheduling workflow operates smoothly, providing a consistent and reliable user experience.
Name _gat_UA-*
Provider rubygarage.org
Retention period 1 minute
Type First party
Category Analytics
Description The _gat_UA-* cookie is a pattern type cookie set by Google Analytics, where the pattern element in the name contains the unique identity number of the Google Analytics account or website it relates to. This cookie is a variation of the _gat cookie and is used to throttle the request rate, limiting the amount of data collected by Google Analytics on high traffic websites. It helps manage the volume of data recorded, ensuring efficient performance and accurate analytics reporting.
Name _ga
Provider rubygarage.org
Retention period 1 year 1 month 4 days
Type First party
Category Analytics
Description The _ga cookie is set by Google Analytics to calculate visitor, session, and campaign data for the site's analytics reports. It helps track how users interact with the website, providing insights into site usage and performance.
Name _ga_*
Provider rubygarage.org
Retention period 1 year 1 month 4 days
Type First party
Category Analytics
Description The _ga_* cookie is set by Google Analytics to store and count page views on the website. This cookie helps track the number of visits and interactions with the website, providing valuable data for performance and user behavior analysis. It belongs to the analytics category and plays a crucial role in generating detailed usage reports for site optimization.
Name _gid
Provider rubygarage.org
Retention period 1 day
Type First party
Category Analytics
Description The _gid cookie is set by Google Analytics to store information about how visitors use a website and to create an analytics report on the website's performance. This cookie collects data on visitor behavior, including pages visited, duration of the visit, and interactions with the website, helping site owners understand and improve user experience. It is part of the analytics category and typically expires after 24 hours.
Name _dc_gtm_UA-*
Provider rubygarage.org
Retention period 1 minute
Type First party
Category Analytics
Description The _dc_gtm_UA-* cookie is set by Google Analytics to help load the Google Analytics script tag via Google Tag Manager. This cookie facilitates the efficient loading of analytics tools, ensuring that data on user behavior and website performance is accurately collected and reported. It is categorized under analytics and assists in the seamless integration and functioning of Google Analytics on the website.

How to Improve Website Speed by Optimizing Front-End

  • 19166 views
  • 10 min
  • Jan 13, 2017
Maryna Z.

Maryna Z.

Copywriter

Vlad H.

Vlad H.

Head of Frontend Department

Share

We build websites to spread the word about events, communicate with peers, promote goods and services, and more. Amid the mass of websites, it can be hard to get noticed. That’s why we need to come up with effective ways to boost our website’s search ranking and reach our target audience.

All the way back in 2010, Google identified page load speed among a multitude of factors that determine search result rankings. But even more importantly than search rank, website load speed is crucial for a website’s usability. More time spent loading a webpage results in a higher bounce rate and lower time spent on the website.

Page load time VS website speed

Page Load Time

Page Load Speed represents how fast a webpage is loaded from a server and displayed in a browser. Page Load Time is the period of time between clicking on a link and receiving a response from a server.

There are three major factors to consider with regards to site speed:

  • time for a browser to receive requested data (Page Loading Time);
  • how browser responds to a page load;
  • the speed of rendering by a browser

Naturally, a fast-loading site doesn’t guarantee a top position in search rankings, even though it can provide you with an advantage when your site is tied with another in terms of relevance.

How fast is fast?

Defining average acceptable website speed

Now let’s look at some figures and try to figure out what ‘slow’ and ‘fast’ means in the context of websites. Obviously, these definitions change over time, and internet users become more demanding when it comes to website speed. Back in 1999, when people were still using dial-up Internet connections, they were perfectly fine waiting eight seconds on  average to load a page. In 2006, internet connection speeds had  improved, and users claimed that they were willing to wait up to six seconds. By 2010, users admitted leaving a page if it took more than three seconds to download.

Improve website speed

Google first realized importance of website speed. Arvind Jain, a Google engineer, claims that the corporation cares that new products do not slow down other Google services. It’s no wonder that Google engineers suggested an optimal site performance of 0.1 seconds. That’s what it takes to store visual information in sensory memory. If a page loads in less than in 0.1 seconds, we feel like the page has been downloaded instantly. Naturally, this can be a very effective way to retain customers on your website.

How can you measure website load speed?

What speedometer measures website load speed? On the web you can find  various tools that help you measure your website’s speed. Let’s take a look at the most efficient and popular options.

Google PageSpeed

Google PageSpeed Insights is a great tool for measuring a website’s performance. It lets you track key statistics,  detects possible issues, and offers possible solutions and recommendations on how to improve your website speed. Google PageSpeed uses a graded estimation system with a scale from 1 to 100. If you score 85 or above, your website is considered optimized and performing well. Its extra feature is estimation of user experience of a website’s mobile version.

GTmetrix

GTmetrix tracks your website performance, including scores delivered by Google PageSpeed Insights and YSlow (offered by Yahoo!), as well as optimization recommendations provided by those resources. GTmetrix also includes information on total page load time, page size and number of requests. You can download this information as a report, which is convenient for further analysis.

Pingdom

Another tool for measuring website performance is Pingdom , which is positioned as a professional tool for marketing and overall performance monitoring. You can access Pingdom’s features by subscribing to various plans, and there’s a 14-day trial version available before you commit. Besides essential Pingdom features like rating a website’s performance and displaying browser requests, you can store test results and track changes in website speed over time.

How do you optimize the performance of your website?

After running tests to measure your website’s performance and identify bottlenecks, it’s time to think about site optimization. We’ll focus on front-end (the part of a website that the user interacts with directly) optimization. Here are five ways to optimize your website’s front-end:

1. Leverage browser caching

Caching is an effective way to improve a website's performance. Browser caching happens on the client device: content you’ve already accessed is stored on your hard drive. This is why it may take longer to access a page the first time than it does to load the same page a second time. Browser caching also enables faster page loads when you click “Back” or access a page you’ve recently viewed.

Web pages consist of many elements: images, HTML, CSS and JavaScript files. Certain of these elements are consistently used across website pages (logos, icons, and buttons, for instance). The client’s browser can saves copies of these files(server responses) so they only need to be downloaded once. This process is called browser caching; it speeds up web page downloads, saves network traffic, and reduces server load.

Here are a few HTTP headers for managing client-side caching (browser caching):

  • Expires. The “Expires” header determines when cached content expires. After content expires, the browser will query the origin server to see if the content has changed. “Expires” headers are great for caching static images such as navigation elements and buttons because these types of elements rarely change. But “Expires” is also useful for pages that regularly change. If you set a time for content expiry, then the client-side cache knows when it’s necessary to request a new version of webpage, and the user doesn’t have to refresh the page manually.
  • Cache-Control. The “Cache-Control” header is supported by various directives (adjustable parameters) that extend its scope. Let’s look at a few Cache-Control directives:

The “private” directive designates content as private data that cannot be cached by intermediate proxies. Only the end-user’s browser can cache such data.

The “no-store” directive is a strict option that prohibits caching of any content. This directive comes in handy when dealing with confidential information.

The “no-cache” directive revalidates the content before it’s displayed in an end-user’s browser. Using an ETag header, “no-cache” initiates revalidation of the content to make sure it hasn’t changed since the last session.

  • Last-Modified. The “Last-Modified” header tells the browser when the file was last modified. For example, “Last-modified: Thu, 22 Sep 2016 17:41:35 GMT.” Therefore, when the browser sends the request to the server to check if a file has been updated and it hasn’t, the browser displays the previously cached file. The “ETag” header works on the same principle, only it’s not bound by time limits. Files marked with unique “ETag” headers are retrieved from the cache after file validation.

2. Compress images

In 2016, HTTP Archive conducted research that found that about 64% of a website’s page weight made up of images. Images slow down websites. Thus, optimizing images can be one of the best ways to improve your site’s load time. Before you dig into techniques of image compression and think about optimal formats, ask yourself if you really need certain images; as a rule, a website should minimize graphics that negatively impact speed, as this results in an overall poorer user experience. If you cannot eliminate an image, consider CSS effects instead that weigh less and look sharp at any resolution.

Moreover, consider which image format is most suitable. For example, should you go with raster or vector images. Vector formats are more preferable for working with logos, text, and icons, as the quality of vector images does not depend on scale and resolution. However, vector formats are not good for complex images such as photographs. With photographs, you should consider using a  raster image format, such as JPEG, GIF or PNG. In order to pick the correct format, you might consider the decision flowchart provided by Google:

speed up your website

This chart comes in handy if you are hesitating about which format to choose, but want to minimize your site’s size.

3. Minimize CSS, HTML and JavaScript

  • Minify  CSS, HTML, and JavaScript by removing  unnecessary gaps, tabulation symbols, line folds, and so on. This results in poorer code readability for humans, but with smaller file sizes — and machines can read minified code just fine.
  • Benefits of the asset pipeline. The asset pipeline is a default Ruby on Rails framework which combines, minifies and compresses JavaScript and CSS resources. It also enables you to create these resources in other programming languages and preprocessors including CoffeeScript, Sass, and LESS.
  • Reduce number of requests. The number of requests that a browser can perform simultaneously is limited, which is why reducing the number of requests can reduce load times. The asset pipeline combines resources, resulting in fewer browser requests.
  • Cache files. File caching improves page load time — but what can you do if you’ve made changes to an asset? To account for possible changes, the pipeline uses a fingerprint — the tool for building a relation between a file’s name and its content. If a file is renamed after changing its content, the fingerprint enables the user to check if two versions of the file are similar. This technique provides the browser with the relevant file version.

4. Follow the Above-the-Fold Principle

It’s a proven fact: the placement of elements on your website plays an important role in your site’s overall load speed. The more elements you have, including images and stylesheets, the more HTTP requests are made for each element which lead to increased load speed. Distributing your website’s elements properly enables you to effectively improve your front-end performance.

The Above-the-Fold principle is about putting the most necessary elements on the upper part of a webpage that can be seen without scrolling down. Here are several tips for following the Above-the-Fold principle:

  • Minimize data above the fold. The more data is shown at the top of a page the more HTTP requests are sent to the hosting server; this process directly impacts page load time. Minifying the data above the fold leads to better website performance.
  • Move CSS to the upper part of a webpage. Putting CSS in the header of your website leads to  step-by-step loading of the headline, logo, navigation, and so on. Users feel more comfortable when they can see bits of your site loading, and can tell that something is happening.
  • Put scripts below. If your scripts are in the upper part of a web page, a browser downloads them first and then shows content the user originally requested. Placing scripts at the bottom tells a browser to download the most relevant information first, then download the scripts.
optimize page speed

5. Implement Gzip compression

Compressed files download and transfer to a web browser much faster. Gzip compressor works with text files including JavaScript, CSS and HTML documents; however, elements such as videos, pictures, and audio files cannot be compressed by Gzip. Compressed files take up less space and require less bandwidth. According to surveys, keeping Gzip compressed files on your server can increase a page’s download speed by 3-4 times.

Gzip operates on most modern browsers including Chrome, Firefox, Opera, and Internet Explorer, which makes Gzip one of the most attractive compressors.

Conclusion

Of course, it takes much time and effort to identify a site’s bottlenecks which slow down performance. Follow our blog for an upcoming article on how to optimize your back-end to improve page load time.

CONTENTS

Authors:

Maryna Z.

Maryna Z.

Copywriter

Vlad H.

Vlad H.

Head of Frontend Department

Rate this article!

Nay
So-so
Not bad
Good
Wow
5 rating, average 4.2 out of 5

Share article with

Comments (4)
RedQ Blog
RedQ Blog almost 7 years ago
As always, great guide
Reply
Maryna Z.
Maryna Z. almost 7 years ago
Thank you!
Reply
Khurram Shahzad
Khurram Shahzad over 6 years ago
Good contents for website optimization. Bundling and Minification improve performance of overall website, one part is missing if we use CDN (region base) that also improve the performance, like CDN for css libraraies like bootstrap and Jquery.
Reply
Maryna Z.
Maryna Z. over 6 years ago Khurram Shahzad
Hi! Thanks for noticing :)
Reply

Subscribe via email and know it all first!