wurmlab / wurmlab.github.io

Wurm lab website
https://wurmlab.com
7 stars 25 forks source link

Loading javascript and css and font before real content #68

Open yannickwurm opened 6 years ago

yannickwurm commented 6 years ago

THis is a bad thing says analytics:

Optimization Suggestions Eliminate render-blocking JavaScript and CSS in above-the-fold content Your page has 4 blocking CSS resources. This causes a delay in rendering your page. None of the above-the-fold content on your page could be rendered without waiting for the following resources to load. Try to defer or asynchronously load blocking resources, or inline the critical portions of those resources directly in the HTML. Optimize CSS Delivery of the following:

https://maxcdn.bootstrapcdn.com/…ootswatch/3.3.6/flatly/bootstrap.min.css
https://fonts.googleapis.com/css?family=Lato:400,700,400italic
https://netdna.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.css
https://wurmlab.github.io/css/custom.css

Furthermore, we should put a browser cache date on images and css (not on content) - currently everything that is more than 10minutes old gets redownloaded

Leverage browser caching Setting an expiry date or a maximum age in the HTTP headers for static resources instructs the browser to load previously downloaded resources from local disk rather than over the network. Leverage browser caching for the following cacheable resources:

yeban commented 3 years ago

Optimize CSS Delivery of the following:

How? Moving them to the bottom of the page will cause a flash of unstyled content, i.e., the page will initially rendered with default styles and then updated to match custom css in a flash once the css has finished loading.

yannickwurm commented 3 years ago

perhaps the repo should be self-contained?