• Resolved mrmocha

    (@mrmocha)


    Hello,

    I’m trying to understand how best to use both DNS Pre-fetch and Web Fonts Optimization, however I’m unsure of whether I need to include the full URL paths or just the root domains, and whether they’re only for externally loaded files only.

    For DNS Pre-fetch: This is only for externally linked files correct? Do I need to add the full URL path? Or would just something like //google-analytics.com be enough? And should I do this for every external script? Both js and css?

    For Web Fonts Optimisation: As far as I can see, turning this on optimises the loading of Google fonts. So all that’s left to do is add the full URL path to locally loaded webfonts. For example: https://domain.co.uk/wp-content/plugins/elementor/assets/lib/font-awesome/webfonts/fa-brands-400.woff2 Is that correct?

    These both seem like great tools but I’m hesitant to use them as I’m not sure I’m doing it correctly. I’d love to see some examples of how they should be used if anyone cares to offer any?

    • This topic was modified 3 years, 10 months ago by mrmocha.
Viewing 1 replies (of 1 total)
  • Hello @mrmocha,

    The use of DNS Pre-fetch is used for loading resources from an external source. Upon adding a domain for DNS prefetching, you may set it as domain.com without https:// or https:// in the front. DNS prefetching will work for both of them.

    When adding a local font to the Web Fonts Optimization you will need to add the full path to the specific font. The font will be then preloaded. Make sure you are adding fonts that are actually used on your page, since this may lead to unnecessary preloading.

    Regards,
    Kristiyan

Viewing 1 replies (of 1 total)
  • The topic ‘Clearer documentation for DNS Pre-fetch and Web Fonts Optimization’ is closed to new replies.