title: Reduce the impact of third-party code - Google CDN
body: <p>Seems like my page speed score is heavily impacted by this issue:</p>
  
  <blockquote>
    <p>Reduce the impact of third-party code Third-party code blocked the
    main thread for [number]  ms</p>
  </blockquote>
  
  <p>This number changes every time I run the test, sometimes it's 1,000, sometimes 1,400 etc.</p>
  
  <p>from Google CDN I only load up the jquery plugin and loading web fond script to lazy load fonts, here is relevant code:</p>
  
  <pre><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/webfont/1.6/webfont.js"&gt;&lt;/script&gt;
  &lt;script&gt;
   WebFont.load({
      google: {
        families: ['Open Sans:400,600','Roboto:400,500,700']
      }
    });
  &lt;/script&gt;
  
  &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p><strong>this is the info from page speed insights:</strong></p>
  
  <p>Third-Party | Size|  Main-Thread Blocking Time</p>
  
  <p>Google CDN  | 40 KB | 1,001 ms</p>
  
  <p>Bootstrap CDN   | 70 KB| 0 ms</p>
  
  <p>What should I do to increase my speed?</p>
  
  <p>I noticed that adding more JS code to my site, or removing it, is affecting this "main-thread blocking time", even though that code does not come from Google CDN. </p>
  
  <p>For example, If delete some javascript blocks like these local scripts:</p>
  
  <pre><code>&lt;script src="/js/d3.v5.min.js"&gt;&lt;/script&gt;
  &lt;script src="/js/billboard.min.js"&gt;&lt;/script&gt;
  &lt;script defer src="/js/moment.min.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>the Main-Thread Blocking Time from Google CDN decrease to 500 ms and my score increase</p>