Blog

All posts by Jake

https://github.com/mako-taco

We Speak Data. Do You?

The conversation surrounding how to provide a personalized web experience is happening right now—and here at AddThis, we like to position ourselves smack dab in the middle of it! That’s why we work with our Product Evangelist, Justin Thorp to bring in the coolest, brightest and most forward-thinking thought leaders to come and speak with the smart people we have at our company. Continue reading

The Case for a Stricter Flux

addthis-react-flux-javascript-scaling

With companies like Yahoo, AirBnB, Atlassian, and Github embracing React.js, I think it’s safe to say that Facebook has set a new standard in front-end development with this remarkable library. What drew me to React, at first, was its genius approach to rendering. What has kept me using it are things like propTypes, invariant, and the belief that it’s a library’s responsibility to yell at a developer when they are doing something wrong. Continue reading

Beginner’s Guide to Improving Page Speed When Using AddThis

addthis-pagespeed-beginners-image

Something that is often overlooked in any kind of web development is performance. The amount of time it takes from a user first navigating to your site until your site is drawn on their monitor has been proven to directly impact bounce rates, and de-prioritize your site in Google search results. At AddThis, we have a responsibility to provide you with the best tools the web has to offer, which includes keeping your page as fast as possible. In the past few weeks, we have made some big changes to keep your site snappy. Continue reading

PageSpeed Insights: Removing Render-blocking CSS

If you write javascript which dynamically loads CSS files on your page, you have probably seen PageSpeed Insights complain to you about removing render-blocking CSS. Fixing render-blocking javascript is relatively easy: just add an async attribute to the script, and include it before the closing body tag, or use an async loader like Google Analytics. Fixing render-blocking CSS is a little trickier. We employ a little media query magic to get the job done.

// append css dynamically to head
var head = document.getElementsByTagName('head');
var element = document.createElement('link');
element.rel = 'stylesheet';
element.type = 'text/css';
element.href = '//www.my-external-css.com/my.css';

//here's the magic
element.media = 'non-existant-media';
head.appendChild(element, head.firstChild);
setTimeout(function () {
    element.media = 'all';
});

Continue reading