Actually, this query parameter will be at the end of everything that uses
the the asset function. Since browser cache problems suck, increment this
number before you deploy and crush the problem. These aren’t the assets
you’re looking for.
If you want to get fancy, add an assets_version_format configuration option:
This looks a little funny, but has 2 %s placeholders. The first will
be filled in with the path to the asset and the second will get the version.
Refresh again and check out the path in the source code now:
Head over to the Reference section of the Symfony docs and click into
the framework page. This shows you all the options that can live under
the framework key in config.yml.
Find the assets_version_format. If you want to go really crazy, you can
follow the directions here and create URLs where the version is part of the
path, instead of a query parameter. You’d need to do some extra work with
rewrite rules to get things to load still, but some CDN’s need this type
of cache busting.
All I’d need to do to make this work is upload my files to this CDN host.
And actually, most CDN’s support an “origin pull” configuration, where
it automatically downloads the files from your real server. There’s no uploading
involved at all. Super easy.
Take the http: part off of the host name and view the source: