ryanthompson -
2 years ago

keevitaja -
2 years ago

This versioning is for browser cache busting.

I do not know, how exactly the asset building is working in PyroCMS, but each time the new asset is built/compiled, either it did not exist, asset cache was purged or assets were updated (this is what causes problems), a new version key is generated and injected into the html tag by asset_style or asset_script

<script src="http://site/app.js?v=3434534">

This version key could be some cheap hash like crc32 or similar. No need to have an incremental integer.

keevitaja -
2 years ago

It's not about the compiling.

When file name is the same, but the actual file has changed, browsers tend to use the old file they have cached before. So user gets the outdated file.

As i mentioned before, the version has no other purpose besides the browser cache busting. And the idea is, that you do not have to manually bump the version. Check how Laravel's Elixir versioning is working. End goal should be similar.