Optimizations
mikepetridisz opened this issue · 3 comments
mikepetridisz commented
- Critical dependencies (SPOF) - may block the entire display of the page in case of failure:
- https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js
- fonts.googleapis.com/css?family=Fira+Sans:400,40[...]italic,500,500italic,700
- We could reduce 19% (29.5 KiB) by minifying the assets:
- /css/bootstrap/bootstrap.css
- /css/bootstrap/bootstrap-responsive.css
- /css/swc.css
- 78.7KiB of JavaScript is parsed during initial page load. We could defer parsing JavaScript to reduce blocking of page rendering:
- ajax.googleapis.co[...]n.js (78.5KiB)
- https://openastronomy.org/ (180B of inline JavaScript)
- These png-s are resized on browser side:
openastronomy.org/img/icons[...]s_icon.png (displayed size: 16x16)
openastronomy.org/img/icons[...]l_icon.png (displayed size: 16x16)
openastronomy.org/img/logo/[...]te_svg.png (displayed size: 125x60)
openastronomy.org/img/icons[...]c_icon.png (displayed size: 16x16)
- Jekyll - Content Security Policy could be set - e.g:
We can partially implement it withmeta http-equiv
or by adding custom headers to_config.yml
https://jekyllrb.com/docs/configuration/webrick/
# Custom headers
webrick:
headers:
Content-Security-Policy: default-src 'none'; script-src 'self'; connect-src 'self'; img-src 'self'; style-src 'self';
My-Other-Header: My-Other-Value
-
We could use this for caching:
https://github.com/benbalter/jekyll-include-cache -
We should define a
lang
attribute on the html root
bsipocz commented
@mikepetridisz - would you be interested in opening a PR for these?
@nabobalis - you said you had plans to revamp the webpage at some point. Is that still in the plans?
mikepetridisz commented
@bsipocz sure!
nabobalis commented
I do still have plans, they are still very much alpha at this stage. It's probably gonna take me a while to finish.