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

Add cache busting for CSS assets #260

Closed
imphil opened this issue Aug 2, 2018 · 8 comments
Labels

Comments

@imphil
Copy link
Contributor

@imphil imphil commented Aug 2, 2018

In staging I noticed that the app.css is not using cache-busting, causing changes to go unnoticed by browsers. Use https://symfony.com/doc/current/reference/configuration/framework.html#version and version_format to fix that before going to production.

@imphil imphil added the deployment label Aug 2, 2018
@aquibbaig

This comment has been minimized.

Copy link
Collaborator

@aquibbaig aquibbaig commented Apr 13, 2019

@imphil can I work on this issue?

@aquibbaig

This comment has been minimized.

Copy link
Collaborator

@aquibbaig aquibbaig commented Apr 15, 2019

We should switch to webpack, instead of moving further with Assetic. Encore provides this out of the box. The docs are outdated and query strings are not the standards for implementation of cache busting.

@imphil

This comment has been minimized.

Copy link
Contributor Author

@imphil imphil commented Apr 17, 2019

Is webpack the current "de facto" standard, or has it been superseded by another thing already? Maybe @agathver knows more?

@aquibbaig

This comment has been minimized.

Copy link
Collaborator

@aquibbaig aquibbaig commented Apr 18, 2019

@imphil I had a talk with @agathver. He only suggested that we should migrate to webpack encore

@aquibbaig

This comment has been minimized.

Copy link
Collaborator

@aquibbaig aquibbaig commented Apr 23, 2019

@imphil @agathver should we do webpack-encore ?

@agathver

This comment has been minimized.

Copy link
Collaborator

@agathver agathver commented Apr 24, 2019

Sure go ahead!

@imphil

This comment has been minimized.

Copy link
Contributor Author

@imphil imphil commented Apr 24, 2019

@aquibbaig please note that this bug is about cache busting. Please keep the discussion about assetic and its alternatives in #292 .

@aquibbaig aquibbaig added this to To do in GSoC 2019 Jun 2, 2019
@aquibbaig aquibbaig moved this from To do to Review in progress in GSoC 2019 Jun 2, 2019
@aquibbaig aquibbaig removed this from Review in progress in GSoC 2019 Jun 2, 2019
imphil added a commit that referenced this issue Jun 9, 2019
This commit massively reworks how we deal with frontend code and assets:
JS, (S)CSS, and images.

Previously, we included minified JS/CSS files in our repository and
handled them through Assetic. Assetic is now deprecated, and manually
handling dependencies isn't a great use of our time either.

With this commit, we switch to a more modern frontend flow using Webpack
Encore.

- All third-party JS/CSS is installed as node.js package through yarn,
  as described in package.json.
- Many libraries have been updated to a more recent version, with the
  exception of Algolia and Bootstrap. (For these updates we need to make
  more code changes.)
- The compat layer for IE < 9 has been removed. According to our
  analytics, this affects significantly below one percent of our users.

Fixes #292, #260, #376

Initial work by Aquib Baig, with further contributions by Philipp
Wagner.
@imphil

This comment has been minimized.

Copy link
Contributor Author

@imphil imphil commented Jun 23, 2019

fixed by switching to webpack in 2dfec83

@imphil imphil closed this Jun 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.