I'm declaring preload links for a CSS file containg ONLY
Should I add
<link rel="preload" href="styles.css" as="style"> as="style" or
<link rel="preload" href="styles.css" as="font"> as="font"?
Webmasters Stack Exchange is a question and answer site for pro webmasters. It only takes a minute to sign up.Sign up to join this community
Since you are attempting to load
styles.css which is a style sheet, you should use
If you were loading a font it would look something like this
<link rel="preload" href="fonts/some-webfont.woff2" as="font" type="font/woff2" crossorigin="anonymous">
If you have a look at this article https://developer.mozilla.org/en-US/docs/Web/HTML/Preloading_content you can see that there are a number of different types of content that can be pre-loaded using this technique.