Skip to content

Instantly share code, notes, and snippets.

@alexdiliberto
Last active November 29, 2018 04:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexdiliberto/64e49e32163807ff2ea5e5d18c086ea9 to your computer and use it in GitHub Desktop.
Save alexdiliberto/64e49e32163807ff2ea5e5d18c086ea9 to your computer and use it in GitHub Desktop.
Deliver Ember Apps Faster
// Resource Hints:
// Inline in index.html
<link rel="preload" href="/assets/vendor.js" as="script">
// Or, in the HTTP header (even better)
// https://www.w3.org/wiki/LinkHeader
Link: </assets/vendor.js>; rel=preload; as=script
Link: </assets/neon-tetra.js>; rel=preload; as=script
// Preconnect
<link rel="preconnect" href="https://external-data-api.com">
// Cache for 1 year + Unique fingerprint
request url: https://my-app.com/assets/my-app-abc123.js
cache-control: public:max-age=31536000,immutable
// Tools
https://github.com/kaliber5/ember-cli-bundlesize
https://github.com/kaliber5/ember-cli-bundle-analyzer
https://github.com/simplabs/asset-size-reporter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment