8000 minor #11897 [Frontend] Added some comments about asset versioning an… · symfony/symfony-docs@9d042fc · GitHub
[go: up one dir, main page]

Skip to content

Commit 9d042fc

Browse files
committed
minor #11897 [Frontend] Added some comments about asset versioning and deployment (javiereguiluz)
This PR was merged into the 3.4 branch. Discussion ---------- [Frontend] Added some comments about asset versioning and deployment Fixes #8075. Commits ------- 5ec95bd [Encore] Added some comments about asset versioning and deployment
2 parents d9810a6 + 5ec95bd commit 9d042fc

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

frontend/encore/versioning.rst

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,23 @@ like normal:
6969

7070
<img src="{{ asset('build/images/logo.png') }}">
7171

72+
Troubleshooting
73+
---------------
74+
75+
Asset Versioning and Deployment
76+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
77+
78+
When deploying a new version of your application, versioned assets will include
79+
a new hash, making the previous assets no longer available. This is usually not
80+
a problem when deploying applications using a rolling update, blue/green or
81+
symlink strategies.
82+
83+
However, even when applying those techniques, there could be a lapse of time
84+
when some publicly/privately cached response requests the previous version of
85+
the assets. If your application can't afford to serve any broken asset, the best
86+
solution is to use a CDN (or custom made service) that keeps all the old assets
87+
cached for some time.
88+
7289
Learn more
7390
----------
7491

0 commit comments

Comments
 (0)
0