Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimizations #251

Open
mikepetridisz opened this issue Feb 21, 2020 · 3 comments
Open

Optimizations #251

mikepetridisz opened this issue Feb 21, 2020 · 3 comments

Comments

@mikepetridisz
Copy link

  1. 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
  1. We could reduce 19% (29.5 KiB) by minifying the assets:
- /css/bootstrap/bootstrap.css
- /css/bootstrap/bootstrap-responsive.css
- /css/swc.css
  1. 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)
  1. 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)
  1. Jekyll - Content Security Policy could be set - e.g:
    We can partially implement it with meta 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
  1. We could use this for caching:
    https://github.com/benbalter/jekyll-include-cache

  2. We should define a lang attribute on the html root

@mikepetridisz mikepetridisz changed the title Optimizations [Enhancement] Optimizations Feb 21, 2020
@bsipocz
Copy link
Member

bsipocz commented Feb 21, 2020

@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
Copy link
Author

@bsipocz sure!

@nabobalis
Copy link
Contributor

I do still have plans, they are still very much alpha at this stage. It's probably gonna take me a while to finish.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants