IN THIS ARTICLE
Everything is better when your site loads faster. Google ranks you higher. Users are happier. Bounce rates decrease. More of your content is shared and discovered. And Conversion rates increase. Every site owner cares about site speed, and our team at Shareaholic is obsessed by it! Not a day goes by where we're not thinking about and working on making Shareaholic even faster.
How we optimize Shareaholic for page speed
At Shareaholic, we use industry best practices to make our code as fast and unobtrusive as possible. Here are some of the techniques we employ to to keep your site running fast on Shareaholic!:
Thoughtfully Written, Optimized, Asynchronous Code:
Note: Many speed tests available on the web do not take into account the benefits of asynchronous loading and other popular optimization techniques.
- Shareaholic uses asynchronous scripts. This means that your page can render more quickly. Instead of forcing users to wait for a script to finish downloading before the page renders, Shareaholic code is downloaded in the background, in parallel. This practice provides a faster experience to your visitors with no wait time and slowing of your site. Even Google recognizes Shareaholic as one of the top supporters for asynchronous scripts!
- We have optimized for and serve all resources over HTTP/2. HTTP/2 enables a multitude of performance features including multiplexing (multiple asset requests can reuse a single TCP connection), header compression, stream priority, and more which leads to minimized latency and much faster load times.
- We minify and Gzip compress all files to help browsers download them faster.
- We use image sprites extensively, which are also optimized. By combining images (ex. share button icons) into as few files as possible using image sprites, we reduce the number of round-trips and delays in downloading other resources, reduces request overhead, and can reduce the total number of bytes downloaded by a web page.
- We make extensive use of client and server-side caching strategies. Fetching resources over the network can be both slow and expensive - so we always aim to minimize them.
- We preload resources when appropriate to make the first paint time super fast.
- We lazy load resources when appropriate. Lazy loading is an optimization technique that delays the loading of objects, resulting in faster load times.
The advantage of All-In-One: Fewer Files, Fewer Conflicts, Great Efficiency:
Shareaholic provides an optimized all-encompassing solution that requires only one install of code to serve multiple apps, such as share buttons, related content, social analytics, and monetization tools. There are several site speed efficiencies gained by having one service provide all these essential services for your site. Plus, all our apps play well together. This has the added benefit of minimizing pesky conflicts between services and plugins.
Shareaholic also loads files related only to the specific apps and functionality that you enable for a page. This ensures smaller files being loaded, and quicker loading time.
Active Performance and Uptime Monitoring:
We design all services with high availability in mind. Our goal is to deliver 99.95% or better uptime across all our products.
Designed with redundancy, fault tolerance and disaster recovery at the forefront. All of our application and data infrastructure is hosted on Amazon Web Services (AWS), a highly scalable cloud computing platform with end-to-end security and privacy features built in. All our infrastructure is within our virtual private cloud (VPC) with production access restricted to operations support staff only. This allows us to leverage complete firewall protection, private IP addresses and other security features.
For more specific details regarding AWS security, please refer to https://aws.amazon.com/security/.
To support our uptime and performance goals, we employ a variety of enterprise-grade internal and third-party tools (for example - New Relic, Pingdom, Sentry.io) to accurately monitor and report on any anomaly that could impact the delivery of our services.
Easy on Your Web Host and Server:
Because all of the processing and collection runs on Shareaholic's servers and not yours, it doesn't cause any additional load on your hosting account. Instead of performing complex database queries on your database on every page load, Shareaholic builds its own relationships on our servers and then references them for lightning fast queries. Our beefy servers take on that load for you. This is specially important if your site is on a shared hosting plan.
Built for Scale & You're in Great Company to Boot:
Shareaholic is used and trusted by hundreds of thousands of websites like yours and touches over 450 million people each month. It doesn't matter if your website generates 1 view or 100 million. Shareaholic scales to any size and works just as well. Site owners trust us because at Shareaholic we have an established history of paying great attention to detail, speed, security and scalability, to make your and your site visitors experience the best it can be. We strive to "doing it right".
Tips on fine tuning your Shareaholic powered site to go faster:
There are certain features that do a bit more heavy lifting and can take a little longer to render on the page than others, because of their nature. There shouldn't be a need to turn any of these features off as they are optimized, but hey, we understand there is a delicate balance to be achieved between features and site speed, and the options are completely in your control. Here are a couple of options to make your pages load even faster:
If you are using Shareaholic's WordPress or Drupal plugin, try turning on the Local Share Count Proxy under advanced settings or the Shareaholic hosted Share Count Proxy API (preferred).
This feature consolidates many client side HTTP requests to one single request for your visitors, which should make your site faster.
In addition to saving on client side HTTP requests, Server Side Share Counts API is also optimized to use server-side caching, so that it doesn't have to fetch Share Counts from each source (Facebook, Pinterest, etc) on every page load for each visitor. The API temporarily caches share count results in order to improve performance. In most cases, unless you're using a really bad shared host (if you are, consider switching!), should make your site feel faster.
Disabling the Share Count Proxy API automatically enables Client Side Share Counts. When Client Side Share Counts are enabled, the end user client calls the individual share service directly to gather share counts information. While we do optimize these calls, and cache them client-side, Share Count Proxy will be more performant.
- Try turning off Share Counts on your Index Pages (Index Pages are pages with more than 1 post). If you have multiple posts on your Index page (ex. your homepage) with share buttons enabled for each post, you may notice a slight delay in share buttons rendering completely as Share Counts need to be fetched for each post. For pages with only one post, share buttons and share counts should render more quickly since one has to retrieve share counts for just one URL.
- Try turning off 3rd party data services under Analytics Settings. The data observed from this is used to enhance analytics and the quality of Content Recommendations. Turning this off will reduce the number of redirect requests on your pages. We do not recommend turning this off, but it is an option.
DNS Prefetching. This notifies the client that there are assets we'll need later from a specific domain so the browser can resolve the DNS as quickly as possible. We have measured significant improvements in load times when implemented. To implement, include the following code as early as possible to the <head> section:
<link rel='dns-prefetch' href='//k4z6w9b5.stackpathcdn.com' />
<link rel='dns-prefetch' href='//cdn.shareaholic.net' />
<link rel='dns-prefetch' href='//www.shareaholic.net' />
<link rel='dns-prefetch' href='//analytics.shareaholic.com' />
<link rel='dns-prefetch' href='//recs.shareaholic.com' />
<link rel='dns-prefetch' href='//go.shareaholic.com' />
<link rel='dns-prefetch' href='//partner.shareaholic.com' />
Note: DNS Prefetching is built into our WordPress and Drupal plugins, so if you're using one of these plugins, this optimization is automatically taken care of for you.