Plone's cachebusting url construction

I can't seem to figure out why Plone 5 uses two different forms of cache-busting urls for thing like CSS/JS. Sometimes it is in a query string parameter with the key 'version' and sometime embedded in a "directory" name. I would prefer it to always be the latter, but is there a way to control the style in the registry entry somehow?


vs.

it depends entirely on the namespace (++plone++) as you can see in the CMFPlone source code
I used to think that the ++plone++ namespace was reserved for resources under the 'CMFPlone/static' directory on the filesystem, but now I am not so sure. I think that if you are using bundles you can set them under the ++plone++ namespace and their resources (the individual files) will be accessed through the (OFS) static directory in the ++plone++ namespace even if the filesystem resources are NOT under CMFPlone. The mechanism is internally used for mockup in Plone, but it's available for add-ons. So my opinion (a pretty uninformed one I hasten to say) is that yes, you can pick your cachebusting, if you are bundling your resources in the official and approved Plone-5 way.

1 Like