@@ -8,16 +8,17 @@ How to Use a Custom Version Strategy for Assets
8
8
The Asset component was introduced in Symfony 2.7.
9
9
10
10
Asset versioning is a technique that improves the performance of web
11
- applications by adding a version identifier to the URL of your static assets
12
- (CSS, JavaScript, images, etc.) When the content of the asset changes, the
13
- identifier changes and the browser is forced to download it again instead of
14
- using the cached version .
11
+ applications by adding a version identifier to the URL of the static assets
12
+ (CSS, JavaScript, images, etc.) When the content of the asset changes, its
13
+ identifier is also modified to force the browser download it again instead of
14
+ reusing the cached asset .
15
15
16
- Symfony supports the basic asset versioning thanks to the
16
+ Symfony supports asset versioning thanks to the
17
17
:ref: `version <reference-framework-assets-version >` and
18
18
:ref: `version_format <reference-framework-assets-version-format >` configuration
19
- options. If your application requires a more advanced versioning, you can create
20
- your own version strategy.
19
+ options. If your application requires a more advanced versioning, such as
20
+ generating the version dynamically based on some external information, you can
21
+ create your own version strategy.
21
22
22
23
Creating your Own Asset Version Strategy
23
24
----------------------------------------
@@ -39,7 +40,7 @@ Implement VersionStrategyInterface
39
40
Asset version strategies are PHP classes that implement the
40
41
:class: `Symfony\\ Component\\ Asset\\ VersionStrategy\\ VersionStrategyInterface `.
41
42
In this example, the constructor of the class takes as arguments the path to
42
- the manifest file generated by gulp-buster and the format of the generated
43
+ the manifest file generated by ` gulp-buster `_ and the format of the generated
43
44
version string::
44
45
45
46
// src/AppBundle/Asset/VersionStrategy/GulpBusterVersionStrategy.php
0 commit comments