You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As you can see, a version parameter (?v=) is appended to the URL, this has the reason that browsers are caching the file and we want to ensure that always the newest file is delivered and there are no caching problems.
This version parameter is generated in lib/private/templatelayout.php as following:
The problem here is that it only considers the ownCloud version, but not the app version itself. Which means that independent apps might suffer from problems when calling addScript or addStyle and are being updated independently from the ownCloud version. In this case still the old hash would be used.
The solution here is to detect the version of the specified application and calculate the hash from the app version.
The text was updated successfully, but these errors were encountered:
LukasReschke
changed the title
CSS version parameter in templatelayout.php has to consider the app version
CSS/JS version parameter in templatelayout.php has to consider the app version
Oct 1, 2014
ownCloud offers the
addStyle()
andaddScript()
methods to app developers, using this method you can include Javascript or CSS files into the output.For example:
Will result in:
As you can see, a version parameter (
?v=
) is appended to the URL, this has the reason that browsers are caching the file and we want to ensure that always the newest file is delivered and there are no caching problems.This version parameter is generated in
lib/private/templatelayout.php
as following:The problem here is that it only considers the ownCloud version, but not the app version itself. Which means that independent apps might suffer from problems when calling
addScript
oraddStyle
and are being updated independently from the ownCloud version. In this case still the old hash would be used.The solution here is to detect the version of the specified application and calculate the hash from the app version.
The text was updated successfully, but these errors were encountered: