File tree 4 files changed +26
-18
lines changed
Filter options
4 files changed +26
-18
lines changed
Original file line number Diff line number Diff line change @@ -552,10 +552,11 @@ done from the template and is relative to the public document root:
552
552
553
553
.. note ::
554
554
555
- Symfony also contains a method for cache *busting *, where the final URL
556
- generated by Assetic contains a query parameter that can be incremented
557
- via configuration on each deployment. For more information, see the
558
- :ref: `reference-framework-assets-version ` configuration option.
555
+ Symfony provides various cache busting implementations via the
556
+ :ref: `version <reference-framework-assets-version >`,
557
+ :ref: `version_format <reference-assets-version-format >`, and
558
+ :ref: `json_manifest_path <reference-assets-json-manifest-path >`
559
+ configuration options.
559
560
560
561
.. _assetic-dumping :
561
562
Original file line number Diff line number Diff line change @@ -10,13 +10,17 @@ applications by adding a version identifier to the URL of the static assets
10
10
identifier is also modified to force the browser to download it again instead of
11
11
reusing the cached asset.
12
12
13
- Symfony supports asset versioning thanks to the
14
- :ref: `version <reference-framework-assets-version >`,
15
- :ref: `version_format <reference-assets-version-format >`, and
16
- :ref: `json_manifest_path <reference-assets-json-manifest-path >` configuration
17
- options. If your application requires a more advanced versioning, such as
18
- generating the version dynamically based on some external information, you can
19
- create your own version strategy.
13
+ If your application requires advanced versioning, such as generating the
14
+ version dynamically based on some external information, you can create your
15
+ own version strategy.
16
+
17
+ .. note ::
18
+
19
+ Symfony provides various cache busting implementations via the
20
+ :ref: `version <reference-framework-assets-version >`,
21
+ :ref: `version_format <reference-assets-version-format >`, and
22
+ :ref: `json_manifest_path <reference-assets-json-manifest-path >`
23
+ configuration options.
20
24
21
25
Creating your Own Asset Version Strategy
22
26
----------------------------------------
Original file line number Diff line number Diff line change @@ -123,8 +123,10 @@ asset
123
123
124
124
Returns a public path to ``path ``, which takes into account the base path
125
125
set for the package and the URL path. More information in
126
- :ref: `templating-assets `. For asset versioning, see
127
- :ref: `reference-framework-assets-version `.
126
+ :ref: `templating-assets `. Symfony provides various cache busting
127
+ implementations via the :ref: `reference-framework-assets-version `,
128
+ :ref: `reference-assets-version-strategy `, and
129
+ :ref: `reference-assets-json-manifest-path ` configuration options.
128
130
129
131
asset_version
130
132
~~~~~~~~~~~~~~
Original file line number Diff line number Diff line change @@ -771,11 +771,12 @@ should render with the subdirectory (e.g. ``/my_app/images/logo.png``). The
771
771
``asset() `` function takes care of this by determining how your application is
772
772
being used and generating the correct paths accordingly.
773
773
774
- Additionally, if you use the ``asset() `` function, Symfony can automatically
775
- append a query string to your asset, in order to guarantee that updated static
776
- assets won't be loaded from cache after being deployed. For example, ``/images/logo.png `` might
777
- look like ``/images/logo.png?v2 ``. For more information, see the :ref: `reference-framework-assets-version `
778
- configuration option.
774
+ .. tip ::
775
+
776
+ The ``asset() `` function supports various cache busting techniques via the
777
+ :ref: `version <reference-framework-assets-version >`,
778
+ :ref: `version_format <reference-assets-version-format >`, and
779
+ :ref: `json_manifest_path <reference-assets-json-manifest-path >` configuration options.
779
780
780
781
If you need absolute URLs for assets, use the ``absolute_url() `` Twig function
781
782
as follows:
You can’t perform that action at this time.
0 commit comments