I have just find out about this script, when trying to increase my page-speed.
Currently I'm loading about 3 Google Web Fonts in the HEAD
, and it decreases my page speed since it's a "Render blocking element".
So I read about this script here
And Just added script inside the BODY
tag (but and before loading jquery script, as I figure it will be faster that way)
<script src="https://ajax.googleapis.com/ajax/libs/webfont/1.6/webfont.js"></script>
<script>
WebFont.load({
google: {
families: ['Source Sans Pro:400,600,700,400italic,700italic', 'Roboto Condensed:400,700']
}
});
</script>
And that's it, my page speed increase.
So I'm just wondering, are there any disadvantages for using this method?
P.S, I think version 1.6 is the latest on google. I saw there's some github library for it, but no clue if I should and how to use it.