-2

Which is the fastest way to load the CSS

By using a link ref in the header or by using an @import in the CSS file.

e.g.

<link rel='stylesheet' type='text/css' href='//fonts.googleapis.com/css?family=Gudea:400,700'>

Or

@import url("//fonts.googleapis.com/css?family=Gudea:400,700");

I have run some speed tests but nothing is conclusive. But including the link this file is seen as render blocking, so even though the link separate file should be faster I can't find out if it actually is..

TheAlbear
  • 5,264
  • 7
  • 48
  • 80
  • I don'T see this as a duplicate. As this question clearly has the speed of both methods as target. – Daniel Aug 19 '15 at 11:32

1 Answers1

2

Including a CSS file via HTML link tag should give faster results, as the browser can load the font file even before having loaded the CSS file. In theory the browser should load both files parallel. You can invesatigate this using the brwoser developer tools network tab.

Daniel
  • 3,458
  • 2
  • 32
  • 41