(Enhancement for developers) Use a timestamp defined at compile time to workaround client-side caching problems during development.

SVN:trunk[5690]
This commit is contained in:
Denis Flaven
2018-04-18 13:45:08 +00:00
parent d32db977eb
commit 9c3b053727
9 changed files with 41 additions and 24 deletions

View File

@@ -541,11 +541,11 @@ class WebPage implements Page
// so that the new script do NOT get reloaded from the cache when the application is upgraded
if (strpos($s_script, '?') === false)
{
$s_script .= "?itopversion=".ITOP_VERSION;
$s_script .= "?t=".utils::GetCacheBusterTimestamp();
}
else
{
$s_script .= "&itopversion=".ITOP_VERSION;
$s_script .= "&t=".utils::GetCacheBusterTimestamp();
}
echo "<script type=\"text/javascript\" src=\"$s_script\"></script>\n";
}
@@ -562,11 +562,11 @@ class WebPage implements Page
{
if (strpos($a_stylesheet['link'], '?') === false)
{
$s_stylesheet = $a_stylesheet['link']."?itopversion=".ITOP_VERSION;
$s_stylesheet = $a_stylesheet['link']."?t=".utils::GetCacheBusterTimestamp();
}
else
{
$s_stylesheet = $a_stylesheet['link']."&itopversion=".ITOP_VERSION;
$s_stylesheet = $a_stylesheet['link']."&t=".utils::GetCacheBusterTimestamp();
}
if ($a_stylesheet['condition'] != "")
{
@@ -590,7 +590,7 @@ class WebPage implements Page
}
if (class_exists('MetaModel') && MetaModel::GetConfig())
{
echo "<link rel=\"shortcut icon\" href=\"".utils::GetAbsoluteUrlAppRoot()."images/favicon.ico?itopversion=".ITOP_VERSION."\" />\n";
echo "<link rel=\"shortcut icon\" href=\"".utils::GetAbsoluteUrlAppRoot()."images/favicon.ico?t=".utils::GetCacheBusterTimestamp()."\" />\n";
}
echo "</head>\n";
echo "<body>\n";