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

New CSS serving #186

Open
isra00 opened this issue Apr 4, 2022 · 1 comment
Open

New CSS serving #186

isra00 opened this issue Apr 4, 2022 · 1 comment

Comments

@isra00
Copy link
Owner

isra00 commented Apr 4, 2022

CSS should be minified in build time or, in lack of a proper build system, deploy time. It does not make sense to have CSS minified on-demand when it won't change on-demand.

The minified CSS' URL may be style.min.css?md5={md5 in config}.

What about keeping old versions?

  • If the new version is MD5=123456, and a user requests MD5=000000, they will receive the new version since it's the only one the server can serve.
  • What if the HTML is outdated but a new CSS is received? It would be dangerous if the new CSS works only with new HTML, but the case is unusual.

When is the CSS' md5 updated? In every deploy means that even if it was not changed the users will renew it. If it's in build time, we could detect whether CSS has changed, but that's kind of magic. If it's in deploy time, we can have a checkbox in the deploy script that will re-minify the CSS and update the config.

@isra00
Copy link
Owner Author

isra00 commented Apr 19, 2022

Wait for Laravel

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

1 participant