Hi,
A quick question – I’m using Typekit and the your Typekit plugin on a website that I’m currently developing, and on Chrome DevTools it says:
A preload for 'https://use.typekit.net/[TYPEKIT-ID].js' is found, but is not used because the request credentials mode does not match. Consider taking a look at crossorigin attribute.
The resource https://use.typekit.net/[TYPEKIT-ID].css was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.
How do I add the ‘as’ values and the crossorigin attributes to the script and CSS preload?
I manually added a on Head but Chrome is still showing the notice.
I hunted down the notice on Chrome DevTools and it was on the embed script on your plugin as shown below.
Thanks
Chris
<script>
(function(d) {
var config = {
kitId : '<?php echo $tco_typekit_kit_id; ?>',
scriptTimeout : 3000,
async : true
},
h=d.documentElement,t=setTimeout(function(){h.className=h.className.replace(/\bwf-loading\b/g,"")+" wf-inactive";},config.scriptTimeout),tk=d.createElement("script"),f=false,s=d.getElementsByTagName("script")[0],a;h.className+=" wf-loading";tk.src='https://use.typekit.net/'+config.kitId+'.js';tk.async=true;tk.onload=tk.onreadystatechange=function(){a=this.readyState;if(f||a&&a!="complete"&&a!="loaded")return;f=true;clearTimeout(t);try{Typekit.load(config)}catch(e){}};s.parentNode.insertBefore(tk,s)
})(document);
</script>