Support

Optimizing AddThis Performance


Asynchronous Loading

Normally, AddThis executes initialization code as soon as it arrives on the page. While we strive to make this as efficient as possible, load times of more important resources can be affected. To optimize load time, AddThis can be loaded asynchronously, such that no assets are loaded and only the most essential processing occurs.

To enable asynchronous loading, add the querystring parameter "async" to the end of the addthis_widget.js script tag. Here's an example:

	<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#async=1"></script> 

This will prevent all AddThis assets from loading except for the initial script. When you're ready for AddThis to load, call the function "addthis.init()", like this:

	function initAddThis() 
     {
          addthis.init()
     }
     // After the DOM has loaded...
     initAddThis();

The addthis_widget.js will begin loading whenever it's parsed by the browser. If you're concerned about your page load time, you can place the script at the bottom of your page. Alternatively, you can use JavaScript with our 'DOM-ready' parameter to dynamically add the script tag to your page after the DOM is ready.

Caveats
  1. Initialization must be performed AFTER the DOM is ready.
  2. Click tracking will not occur until initialization.



Loading Without CSS

If desired, you can prevent our CSS from loading during the initialization sequence, allowing you to completely override our CSS without incurring the cost of an additional load. It's fine to skip loading our CSS if you just want to use third-party native buttons (Facebook Like/Send, Tweet, etc). Set the following JavaScript variable as follows:

	var addthis_config = {
         ui_use_css : false
     }

View AddThis Client API specification for additional assistance.

Last Updated: Feb 29, 2012 01:59PM EST
help@addthis.com
http://assets03.desk.com/
false
desk
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
false
Invalid characters found
/customer/en/portal/articles/autocomplete