How to achieve faster page speeds for increased conversion rates and better user engagement ?


What is Page Speed ?

Page Speed is the amount of time it takes to load a web page. Most of the users expect to load websites below 2 seconds or less. If it takes more than 3 seconds, the site tends to have higher bounce rates and lower average time on page.

Why does the website become slow ?

There could be many reasons for the low page speed. It might be because of server load time, image size, a number of redirects, page weight.

What factors affect the Page Speed ?

  • Prioritize Visible Content
  • Minify Resources
  • Optimize Images
  • Optimize CSS
  • Optimize Scripts
  • Remove Render-Blocking JavaScript
  • Use Asynchronous Scripts
  • Avoid Redirects
  • Leverage Browser Caching
  • Enable GZIP Compression

1. Prioritize Visible Content :

Visible content is the portion of webpage users see on their screen before they scroll. It is also referred to as “above the fold”. This can be achieved by giving lazy load for the images and javascript.

2. Minify Resources :

Minification of resources means removing the unnecessary or redundant code which is present in the file. Minification can be done to HTML, CSS, JS. There are many online minifiers.

3. Optimize Images :

Make sure to optimize the images. Large image size makes the page heavy and page speed high.

4. Optimize CSS :

Combine all the CSS and make it a single stylesheet and minify the file.

5. Optimize Scripts :

Combine all the javascript and make it a single js and minify the file. Give lazyload for the javascript so that js loads after all the HTML, CSS, Images loads.

6. Remove Render-Blocking JavaScript :

Ensure there are no HTML references to external JavaScript files in the above the fold portion of the page. When the browser sees a script in the document, it pauses the HTML execution and executes scripts first. So, we should not place scripts in the header as it causes a delay in rendering the page.

7. Use Asynchronous Scripts :

We can apply asynchronous JavaScript to avoid parsing of DOM elements.

Another way to defer the javascript is to place the scripts in the footer of the page.

8. Avoid Redirects :

This can be done by lazy loading the scripts. Here is sample script for lazy loading of javascript.

9. Leverage Browser Caching :

Leverage Browser Caching means how long the web browser should keep CSS, images, JS stored locally. By doing so, the browser will download less data while navigating through the pages, which will improve the loading speed of the website.

Add this piece of code in .htaccess file

## EXPIRES CACHING ##

<IfModule mod_expires.c>

ExpiresActive On

ExpiresByType image/jpg "access 1 year"

ExpiresByType image/jpeg "access 1 year"

ExpiresByType image/gif "access 1 year"

ExpiresByType image/png "access 1 year"

ExpiresByType text/css "access 1 month"

ExpiresByType application/pdf "access 1 month"

ExpiresByType application/javascript "access 1 month"

ExpiresByType application/x-javascript "access 1 month"

ExpiresByType application/x-shockwave-flash "access 1 month"

ExpiresByType image/x-icon "access 1 year"

ExpiresDefault "access 2 days"

</IfModule>

## EXPIRES CACHING ##

10. Enable gZip Compression :

GZip is the method of compressing files to make pages smaller to improve loading speed.

How to enable gZip Compression :

Compression is enabled via web server configuration.

Different web servers have different instructions. Here are the most common ways to enable compression including .htaccess, Apache and Nginx web servers.

Enabling gzip compression via .htaccess file :

Add this code in .htaccess file to enable compression

<ifModule mod_gzip.c>

mod_gzip_on Yes

mod_gzip_dechunk Yes

mod_gzip_item_include file .(html?|txt|css|js|php|pl)$

mod_gzip_item_include handler ^cgi-script$

mod_gzip_item_include mime ^text/.*

mod_gzip_item_include mime ^application/x-javascript.*

mod_gzip_item_exclude mime ^image/.*

mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*

</ifModule>

Enabling gzip compression on Apache Web Server :

The above code will work for the Apache webserver as well. If in case that doesn’t work, remove that code and add the below code to .htaccess file

AddOutputFilterByType DEFLATE text/plain

AddOutputFilterByType DEFLATE text/html

AddOutputFilterByType DEFLATE text/xml

AddOutputFilterByType DEFLATE text/css

AddOutputFilterByType DEFLATE application/xml

AddOutputFilterByType DEFLATE application/xhtml+xml

AddOutputFilterByType DEFLATE application/rss+xml

AddOutputFilterByType DEFLATE application/javascript

AddOutputFilterByType DEFLATE application/x-javascript

Enabling gzip compression on Nginx Web Server :

To enable compression in Nginx you will need to add the following code to your config file

gzip on;

gzip_comp_level 2;

gzip_http_version 1.0;

gzip_proxied any;

gzip_min_length 1100;

gzip_buffers 16 8k;

gzip_types text/plain text/html text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript;

# Disable for IE < 6 because there are some known problems

gzip_disable "MSIE [1-6].(?!.*SV1)";

# Add a vary header for downstream proxies to avoid sending cached gzipped files to IE6

gzip_vary on;

Results :

Before Optimization for Mobile Version

After Optimization for Mobile Version

Before Optimization for Desktop Version

After Optimization for Desktop Version

Blog Categories

Looking for a Top Rated* Marketing Company?

Contact us at +1 630 999 (7768) or submit a business inquiry online.

NectarSpot team executed the Quick and solid build of AMP website. Not afraid of small tweaks here and there. The team has, from the beginning of project, focus on conversion and provided a seamless workflow for my prospects to visit, educate and finally purchase on my e-commerce portal. They provided design, development on AMP framework and helped to host e-commerce portal on scalable and secure google cloud. We are looking forward to working with them in future for other projects as well.

Read More....

Ryan Frederickson

Art Wine Preserver


NectarSpot team successfully re-branded and revamped our old website delphiusmle.com to a fast loading and aesthetically pleasing within a short time frame of four weeks. NectarSpot designers and developers created a distinct UI/UX landing pages that communicates our brand as an established brand identity helping us to get more conversions. Our end users appreciate the site’s unique and polished presentation through an informative, well laid-out content and beautifully designed pages that helps a seamless interaction . The team is extremely organized and communicative and working with their team was seamless and highly collaborative. Their team is both technically and creatively talented. After creating relevant landing pages and revamping the entire site, NectarSpot is helping us to generate qualified leads through Google Ads campaign. We see a definitive increase in key web metrics such as higher conversion rate, lower bounce rate and higher engagement. We would highly recommend NectarSpot to anyone looking to up-brand their digital identity and get qualified leads.

Read More....

Roy Lingam

CEO,Delphi USMLE,Chicago

Read more to gain insights from our blogs.
Receive latest marketing insights, data and inspiration by subscribing .

Start Your Project Today (100% Satisfaction Guaranteed)

  • NectarSpot Inc. is an integrated digital marketing agency specializing in Design & Development of Web, Mobile & Voice Applications.
    We excel in providing Optimization, Automation, PPC & Analytics services to high performing brands across industries.

    Contact us today at +1 630 999 (7768) or email at info@nectarspot.com to know more.

Need help?

We are right here!