AddToAny consistently supports perfect 100
scores on PageSpeed and Lighthouse.
Run this page through PageSpeed Insights to see for yourself!
FAQ
What does a PageSpeed report on this page demonstrate?
The report shows that AddToAny can be used with no impact on user experience or the scores of page speed evaluation tools.
What considerations went in to making this page test-worthy?
This page was created to achieve a perfect score of 100 in all categories as a baseline for measuring the potential impact of using AddToAny.
We intentionally use a domain that isn't addtoany.com
to factor in external connection time, which is usually in the low tens of milliseconds and sometimes just a single digit.
To demonstrate how sites can avoid cumulative layout shift (CLS), this page uses inline share buttons and gives the AddToAny container element an explicit height using CSS.
How can I prevent cumulative layout shift (CLS) from inline buttons?
If you're using inline buttons, give the AddToAny container element an explicit height with CSS code. For example, add .a2a_kit_size_32 { height: 32px; }
to your stylesheet.
Floating buttons do not cause cumulative layout shift (CLS).
How is AddToAny optimized to support perfect scores on PageSpeed Insights?
AddToAny's page.js
is a super-lightweight script that's cached globally near users and uses modern HTTP multiplexing by loading only what's needed as fast as possible over a single connection. Asynchronous loading ensures that page parsing is never blocked.
What if PageSpeed Insights or Lighthouse scores this page less than 100?
Variability is expected from PageSpeed & Lighthouse (technical documentation). Rerunning a test will often give different results.
These performance tools are under active development, so bugs happen and performance suggestions can change. AddToAny deeply cares about the latter, so we're always taking into consideration the latest & greatest performance recommendations.
What if my website's report shows opportunities involving AddToAny?
That can indicate a deeper site issue that's worth fixing.
In some cases, CSS or JavaScript used on the site may override the appearance or behavior of AddToAny and have an impact on a page's score. To identify the underlying cause, you can utilize your web browser's developer tools to inspect the elements on this page and compare them to the page you're investigating. You can inspect an AddToAny button element, for example, then check for any added styles or event listeners coming from another source on the site, then try again with that source removed.
Site "optimization" tools can sometimes improperly & inefficiently cache AddToAny, which may result in slower loading and PageSpeed being unable to see accessibility features in time (e.g. late-loading href
attributes). To fix this sort of issue, turn off the external JavaScript caching/minification feature(s) of the optimization tool (or exclude AddToAny), and be sure the site is loading AddToAny's main script: https://static.addtoany.com/menu/page.js
.