-
Notifications
You must be signed in to change notification settings - Fork 363
Closed
Labels
performance-optimisationImprovements to the performance of ocaml.org (speed / size / other)Improvements to the performance of ocaml.org (speed / size / other)
Description
Problems with caching of assets (CSS, JavaScript, Fonts) are mentioned in these issues:
- Rendering discrepancies and CSS caching #704
- OCaml Playground's large bundle size #838
- Font loading is slow #797
Underlying problem: We cannot currently enable asset caching via HTTP headers because assets are being served under their exact filenames.
What needs to be done: serve assets under filenames that include a hash (file content or last modified time). This enables us to allow caching via HTTP headers indiscriminately while still maintaining the ability to make changes that will reach our users.
Idea: use a PPX that, at compile time hashes the file content (or inspects the last-modified time) and copies the file accordingly, then returns the path of the hash-named file. Then, we can use, e.g. [%asset "css/main.css" ]
in our templates.
Metadata
Metadata
Assignees
Labels
performance-optimisationImprovements to the performance of ocaml.org (speed / size / other)Improvements to the performance of ocaml.org (speed / size / other)
Type
Projects
Status
✅ Done