lodash / lodash.com

The Lodash website.

Home Page:https://lodash.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fontawesome CSS downloaded twice

Munter opened this issue · comments

When loading the docs page the fontawesome CSS (https://lodash.com/vendor/cdn.jsdelivr.net/fontawesome/4.7.0/css/font-awesome.min.css) is loaded twice.

There a re two reasons for this I can think of:

Either you are hitting a bug where chrome and firefox don't share the same h2 cache for preload (through http headers) and normal load (boot.js).

Or you are hitting the bug where adding an integrity hash make chrome unable to reuse h2 preload cache.

main.css doesn't show this problem though it's also both being preloaded and loaded in the html, so I'm guessing that the integrity hash is the problem.

You are not using an integrity hash on main.css, so I assume that you feel safe about local assets being loaded from the same source without an integrity check. Since you also download the fontawesome CSS to be self-hosted it should be possible to remove the integrity check for it, and maybe hand roll an integrity check to the time where the build system pulls in the fontawesome CSS from the CDN origin

Thanks!

Patched ce5ea61.