Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 8e1fa07

Browse filesBrowse files
committed
cleanup references to cache busting techniques
1 parent 14c609b commit 8e1fa07
Copy full SHA for 8e1fa07

File tree

4 files changed

+26
-18
lines changed
Filter options

4 files changed

+26
-18
lines changed

‎assetic/asset_management.rst

Copy file name to clipboardExpand all lines: assetic/asset_management.rst
+5-4Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -552,10 +552,11 @@ done from the template and is relative to the public document root:
552552
553553
.. note::
554554

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.
559560

560561
.. _assetic-dumping:
561562

‎frontend/custom_version_strategy.rst

Copy file name to clipboardExpand all lines: frontend/custom_version_strategy.rst
+11-7Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,17 @@ applications by adding a version identifier to the URL of the static assets
1010
identifier is also modified to force the browser to download it again instead of
1111
reusing the cached asset.
1212

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.
2024

2125
Creating your Own Asset Version Strategy
2226
----------------------------------------

‎reference/twig_reference.rst

Copy file name to clipboardExpand all lines: reference/twig_reference.rst
+4-2Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,10 @@ asset
123123

124124
Returns a public path to ``path``, which takes into account the base path
125125
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.
128130

129131
asset_version
130132
~~~~~~~~~~~~~~

‎templating.rst

Copy file name to clipboardExpand all lines: templating.rst
+6-5Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -771,11 +771,12 @@ should render with the subdirectory (e.g. ``/my_app/images/logo.png``). The
771771
``asset()`` function takes care of this by determining how your application is
772772
being used and generating the correct paths accordingly.
773773

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.
779780

780781
If you need absolute URLs for assets, use the ``absolute_url()`` Twig function
781782
as follows:

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.