Skip to content

Hashify filenames for all ember assets under /dist/assets #1575

@jtgeibel

Description

@jtgeibel

We currently set a very long cache time (10 years) for files under /assets. Most, but not all, of these files include a content hash in the filename, such that if the content changes then the URL will change and the client receives the newest file data.

Here is the directory structure I get locally after running ember build --env production:

$ tree dist/
dist/
├── assets
│   ├── ajax-loader-1055ecf8290cc425e7f01607a30a68da.gif
│   ├── button-download.svg
│   ├── cargo-56e9163b9f7a2ad27880506b8c0c7399.js
│   ├── cargo-6eed959639bb4344657eaeec932647f7.css
│   ├── Cargo-Logo-Small-c39abeb466d747f3be442698662c5260.png
│   ├── circle-with-i.svg
│   ├── copy.svg
│   ├── crate.svg
│   ├── dashboard.svg
│   ├── download-clear-back.svg
│   ├── download.svg
│   ├── flag.svg
│   ├── following.svg
│   ├── forkme-3cf1263dc1fba4320312f5faff9993bb.png
│   ├── forkme.svg
│   ├── gear.svg
│   ├── GitHub-Mark.svg
│   ├── latest-updates.svg
│   ├── left-pag.svg
│   ├── lock.svg
│   ├── magnifier.svg
│   ├── my-packages.svg
│   ├── noise-f35884d45cc948fa4e0e4de808bda1f5.png
│   ├── right-arrow.svg
│   ├── right-pag.svg
│   ├── search-1bf5f758e4272794e840ccb4b0a0dca9.png
│   ├── sort.svg
│   ├── vendor-0959929b94dda369eea54aa4ca0de36e.css
│   └── vendor-b870c7c4c3dc306acd6f486d9b6f8251.js
├── cargo-835dd6a18132048a52ac569f2615b59d.png
├── ember-fetch
│   └── fastboot-fetch-ee5cef26e0470d371ec08fef9ba4a5b8.js
├── favicon.ico
├── index.html
├── manifest.webmanifest
├── opensearch.xml
└── robots.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions