FOIT
-
You have provided support for font.googleapis.com but what about the fonts retrieved from fonts.gstatic.com please.
That can also be taken care of.
The page I need help with: [log in to see the link]
-
This is the URL generated post injection and it creates the correct CSS file
fonts.googleapis.com/css?display=swap&family=Open+Sans:400,600,700,400italic,300|Poppins:300,400,500,600,700|Montserrat:300,300i,400,800,800i|Lato:300,400,700,900I checked the CSS file created all the fonts in the file are requested from fonts.gstatic.com and also the font-display: swap; is mentioned there but still page speed is showing needs to implement swap.
Cleared all cache
this is a part of the CSS file code.
@font-face {
font-family: ‘Lato’;
font-style: normal;
font-weight: 300;
font-display: swap;
src: local(‘Lato Light’), local(‘Lato-Light’), url(https://fonts.gstatic.com/s/lato/v16/S6u9w4BMUTPHh7USSwaPGR_p.woff2) format(‘woff2’);
unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}@vetjaw
fonts.gstatic.comis the URL download the font file (woff2). Adding display=swap to it is unnecessary and won’t fix the issue.font-display: swapmust be added to the css style sheet and I can see it’s correctly added the code you’ve given. However, I can’t see it in the live site. Maybe you deactivated the plugin?I also noticed that your site has font-awesome in Google PSI errors, which will not be fixed by this plugin
I can understand that it is only for Google sites also I have not removed the plugin and it is still activated and working. just search ?display and you will reach the code in view-source.
If you check the page speed, google is looking at the URL generated to download font and is catching it to be without the ?display and throwing this notification.
Do confirm to satisfy google do we have to put ?display also in the url which downloads the font and before downloading implements ?display=swap ???
@vetjaw “search ?display and you will reach the code in view-source” sorry I couldn’t find it.
“google is looking at the URL generated to download the font and is catching it to be without the ?display and throwing this notification.” It true that Google shows url of the font file. But to fix this, adding display=swap to that font file won’t fix it. You’ve to add into fonts.googleapis.com.
In your case the new URL is
https://fonts.googleapis.com/css?family=Open+Sans:400,600,700,400italic,300|Poppins:300,400,500,600,700|Montserrat:300,300i,400,800,800i|Lato:300,400,700,900&display=swap-
This reply was modified 6 years, 6 months ago by
Gijo Varghese.
Dear sir and your script is putting it in this way on my website
fonts.googleapis.com/css?display=swap&family=Open+Sans:400,600,700,400italic,300|Poppins:300,400,500,600,700|Montserrat:300,300i,400,800,800i|Lato:300,400,700,900@vetjaw sorry to say, it’s not visible on checking. Are you sure you’ve cleared the cache? See http://tinyurl.com/yxq2quej
Dear Sir please check now is it visible or not ?
Page speed still shows the same notification
@vetjaw It’s still not visible in your site.
-
This reply was modified 6 years, 6 months ago by
The topic ‘FOIT’ is closed to new replies.