Is it possible to make Rails assets names shorter (less than 64 char length)?
Is it possible to make Rails assets names shorter (less than 64 char length)?
I know that each file compilation needs to be unique. But I find smaller names prettier. Maybe there's a way to change Rails default behavior by choosing only the last 8 chars.
What I have in my generated HTML...
/assets/rails-ujs.self-8944eaf3f9a2615ce7c830a810ed630e296633063af8bb7441d5702fbe3ea597.js?body=1
What I want...
/assets/rails-ujs.self-be3ea597.js?body=1
0
Thanks for contributing an answer to Stack Overflow!
But avoid …
To learn more, see our tips on writing great answers.
Required, but never shown
Required, but never shown
By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy
More anecdotal, but consider not doing this, doubly so for the reason of making it prettier. Your users or developers will not judge you based on your asset fingerprinting strategy. Further, you will not save much bandwidth at all and have to jump through many hoops that could break in a future release of rails.
– Austio
Sep 16 '18 at 19:14