I encountered the following script in a webpage source :
<script type="text/javascript">
WebFontConfig = {"typekit":{"id":"cmr1bul"}};
(function() {
var wf = document.createElement('script');
wf.src = 'https://s1.wp.com/wp-content/plugins/custom-fonts/js/webfont.js';
wf.type = 'text/javascript';
wf.async = 'true';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(wf, s);
})();
</script>
From what I see, this script inserts the content of https://s1.wp.com/wp-content/plugins/custom-fonts/js/webfont.js before the first script in the page. What is the difference between the above and putting
<script type="text/javascript" src="https://s1.wp.com/wp-content/plugins/custom-fonts/js/webfont.js"> </script>
as the first script in the page ? What is gained by using the longer version ?