I'd like to install a new widget on my website

Created by Josh Cobb, Modified on Thu, 29 Dec 2022 at 01:18 PM by Josh Cobb

Before proceeding with any third-party integration that requires adding additional code to your website, it's important that you understand how this can potentially impact your website page load speed, user experience and conversion rate.

Put simply, third-party JavaScript is a security nightmare for the web. What looks like a simple one-line change (“just add this JavaScript to get free page view tracking!”) opens a door to malicious code that you simply don’t control.

And worse is that third-party JavaScript can and does load other JavaScript from other unknown parties. Even if you trust the company whose code you’ve chosen to embed, you probably don’t trust (or even know about!) what they choose to include.

And even worse these scripts can change any time. Security threats can come and go. The attacker who went after Cloudflare compromised the third-party and modified their service to only attack Cloudflare and included anti-debugging features to try to stop developers spotting the hack. If you're a CIO and this doesn't freak you out already, ask your web development team how many third-party scripts are on your websites. Do you trust them all?

The practice of adding third-party scripts to handle simple tasks is the literal equivalent of pulling a random stranger off the street, giving them physical access to your office, and asking them to stop by once a day to empty the trash. It's completely crazy in the physical world, and yet it's common practice in web development.

Every website contains images, CSS and JavaScript (JS) files to create a pleasant and effective user experience.

These files, also known as resources, can be hosted in one of two ways:

  • Internal resources are stored on your website's own domain
  • External resources are not stored on your domain, but from third-party locations (e.g. Chatbots, Google Ads pixels, Facebook pixels, Diakrit, 3d Floor Plan software, Google Maps and others).

Externally hosted resources often impact the performance of your website significantly:

  • They require additional DNS resolutions for each external domain used, which adds extra time.
  • Some optimizations like browser caching and GZIP compression can only be applied to files hosted on your server. You cannot control resources that are hosted on other servers. 
  • In the case of external JavaScript, like ad scripts and social media scripts, these often introduce chains of other files loaded onto your site that you cannot control. These can be the most problematic for performance.
  • If the third party provider's server goes down, it may prevent your web page from loading altogether or cause long delays in a response./

The more external resources loaded on your site, the greater the chance that your website will load slowly and it is impossible to predict how much or if it will impact your website as the code is managed entirely by the third-party provider. 

Page load speed is important. Roughly 70% of people will close a website if the page doesn't load in 3 seconds or less. And although new website features may be exciting, it's important to consider this article before implementing your new feature.

How can Stepps help prevent any issues for our website visitors even with third-party scripts installed on our website?

It's not possible for Stepps to optimize every external resource completely, but the following features can help:

  1. We use a number of caching techniques to reduce the size of your internal website files
  2. We use multi-layer caching to serve pre-cached files to your visitors

These techniques relate solely to YOUR website files. We cannot apply these techniques to scripts that you have had installed from a third party. For this, we use a technique known as "DNS Pre-Fetching"

What does DNS Prefetching do?

When your site loads any content hosted on a domain besides yours, your visitor's browser has to retrieve the file(s) from that other domain. Part of that process is the browser connecting to the domain, which is called DNS resolution.

DNS prefetching tells the browser to perform this connection before the file is needed, so that it's already complete by the time the file is requested.

This can give your loading time a minor boost, since DNS resolution will already have been processed when the external resources is requested.

This approach will not dramatically boost your page load speed but it will help slightly. The only way to significantly enhance your page load times is to actually remove the third-party content altogether. There is no way to use third-party content without a DNS lookup for each domain. The Prefetch option doesn't remove the need for the lookup, it just processes it sooner. 

Read this guide for more information on why too much third-party content is bad for performance.

So should we proceed with this new feature then?

Delivering experiences on your website that can't be found anywhere else online is important. We advocate strongly for new features wherever they may add value to your Stepps website. 

Should you experience any decrease in page load times after adding a new third party script to your website, please reach out to our team and we will look into this for you to see where, if possible, we can optimise your site further to accommodate the feature you have added.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article