Friedrich Siever
Friedrich Siever

Reputation: 479

Google font loaded by webfontloader is render blocking

Sorry for my English first. Did i miss something? I use the following code to prevent render blocking contents:

WebFontConfig = {
    google: {
        families: ['Lato:300,300i,700']
    },
    active: function () {
        //document.querySelector('body').fadeIn(1000);
    },
};

(function () {
    var wf = document.createElement('script');
    wf.src = ('https:' == document.location.protocol ? 'https' : 'http') +
        '://ajax.googleapis.com/ajax/libs/webfont/1.6.26/webfont.js';
    wf.type = 'text/javascript';
    wf.async = 'true';
    var s = document.getElementsByTagName('script')[0];
    s.parentNode.insertBefore(wf, s);
})();

No success speedtest complains render blocking fonts (async = true)... . I wonder if there is an alternative way to prevent this render blocking... .

Upvotes: 0

Views: 417

Answers (1)

en.a.alishaa
en.a.alishaa

Reputation: 1

You can use the robot.txt in googlewebmaster . exp : disallow : http://exampel.com/postnumber

Upvotes: -1

Related Questions