• Hi, i have use your plugin to minify css but, when i use recommanded css, i have a problem to charge fonts on my site. How to create a critical css to allow font for icon.

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    well, first of all; your fonts are currently not loading due to the cross origin policy them from being loaded from your CDN-domain, see https://davidwalsh.name/cdn-fonts for more info on that.

    regarding critical CSS; depends on how you’re generating your critical CSS, some tools add the google font-files automatically, others would require you to add that yourself manually.

    hope this helps,
    frank

    Thread Starter cdragon1980

    (@cdragon1980)

    If i deactivate css optimize from your plugins, all fonts are back. I dont understand why i can’t control it or change it in your plugin

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    well, fonts can be hard when you’re cdn’ing ??

    Thread Starter cdragon1980

    (@cdragon1980)

    this problem is not by the cdn, i not use cdn like cloudflare or else, i just using a subdomain to be cookie free, that else. It dont impact your plugins. I dont understand why i can’t to exclude font from your plugin.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    subdomains are considered different from the main domain and as such fonts on a subdomain are not loaded due to cross domain restrictions as described in https://davidwalsh.name/cdn-fonts. not putting the AO’ed CSS (and JS) on your subdomain will very likely fix the issues.

    you cannot exclude a font from being autoptimized, only CSS or JS (inline or file).

    hope this clarifies,
    frank

    Thread Starter cdragon1980

    (@cdragon1980)

    I have find an alternativ with another plugin. Thanks…..

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    well, editing your subdomain config (example for Apache below) would also work as per https://davidwalsh.name/cdn-fonts

    
    # Apache config
    <FilesMatch ".(eot|ttf|otf|woff)">
    	Header set Access-Control-Allow-Origin "*"
    </FilesMatch>

    enjoy your sunday,
    frank

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Chargement font awesome & google font’ is closed to new replies.