asset_version=xxx
As far as I can see the asset_version is derived from the config variable
asset_version
The question is - what is its purpose and what does it do?
asset_version=xxx
asset_version
asset_version
and thus forces the client to download a fresh copy of all assets.In 3.1.9 they do:david63 wrote:Most of the core .css files do not use asset_version
Code: Select all
<link href="./styles/prosilver/theme/stylesheet.css?assets_version=123" rel="stylesheet">
<link href="./styles/prosilver/theme/en/stylesheet.css?assets_version=123" rel="stylesheet">
<link href="./styles/prosilver/theme/responsive.css?assets_version=123" rel="stylesheet" media="all and (max-width: 700px)">
Code: Select all
<script type="text/javascript" src="./styles/prosilver/template/forum_fn.js?assets_version=123"></script>
<script type="text/javascript" src="./styles/prosilver/template/ajax.js?assets_version=123"></script>
Code: Select all
<script type="text/javascript" src="./assets/javascript/editor.js"></script>
Code: Select all
<link href="/community/styles/prosilver/theme/print.css" rel="stylesheet" type="text/css" media="print" title="printonly" />
<link href="/community/styles/prosilver/theme/stylesheet.css" rel="stylesheet" type="text/css" media="screen, projection" />
<link href="./styles/prosilver/theme/responsive.css?2014081401" rel="stylesheet" type="text/css" media="only screen and (max-width: 700px), only screen and (max-device-width: 700px)" />
<link href="/assets/css/index.css?2015010500" rel="stylesheet" type="text/css" media="screen, projection" />
In the list I see several resources, including many that I personally don't plan to edit (like the core.js). Is it safe to remove the assets_version part from the resources that probably will never be changed from me?Remove query strings from static resources
Resources with a "?" in the URL are not cached by some proxy caching servers. Remove the query string and encode the parameters into the URL for the following resources:
assets/phpBB_3.1.9/
and change the directory during each upgrade? If [1] holds, I find it too much using the current approach e.g. for core or for standard non-phpBB libraries (scripts). For styles and extensions I understand it, since many users customize them.?assets_version=
in inclusions. Maybe because it reports "more severe" problems before this, although it passes the "Remove query strings from static resources" test.That refers to people that use a proxy. Such as people trying to hide their identity/IP address. Are you planning to attract the Russian mob to your site? In some cases it may apply to cloud caching (CDN) services, but the reputable ones such as cloudflare, this isn't a problem, and if you're not using one of those services, again this is of no consequence. The key there in the warning is "some".MakisH wrote:1. So what about the statement "Resources with a "?" in the URL are not cached by some proxy caching servers."? I couldn't really find any explicit/clear statement about this anywhere else.
Because the warning has nothing to do with page speed, but just with the possibility that cache busting potentially might not be of any use to "some" people visiting your site through a "some" proxy service (if they even do at all).MakisH wrote: 3. Maybe it will not speed anything up, although that's something that I could experiment with. But why do you say that? Based on what and for which cases?