MyBB Community Forums

Full Version: 3rd-party libraries versioning
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
A MyBB version number is attached to each <script> included to overwrite the cache (?ver=1800):
<script type="text/javascript" src="{$mybb->asset_url}/jscripts/jquery.js?ver=1800"></script>
<script type="text/javascript" src="{$mybb->asset_url}/jscripts/jquery.plugins.min.js?ver=1800"></script>

While it seems appropriate for MyBB own scripts it might be a good idea to include the library's version while loading it instead of MyBB's.
This way, files like global.js would keep the ?ver=1800 suffix but 3rd-party libraries like jQuery would receive ?ver=1.11.1.

While manually updating these files (compatibility issues or switching to jQuery 2) user would just change the library version instead of making up new MyBB version number or an abstract string.

The MyBB and external libraries versions are released separately, so I say let's drop the link.
I like the idea
I like the idea as well. Although, the making up a new version code thing isn't a huge deal since just a bit of googling teaches you that it's just a cache buster. You can put literally anything after the ?ver for the functionality to work, as long as it's different and hasn't been used before by your site (so is theoretically not in anyone's cache from the past).