Improved images caching: since 2.3.0-beta, iTop handles inline images (case logs, ticket description) and a picture for a person (AttributeImage). This code refactoring handles a case where the browser checks for the validity of the image and the 304 response code can then be returned without checking anything because we assume that the URL of the image contains a signature of it (or the data cannot change -attachement and inline images are in this case).

SVN:trunk[4217]
This commit is contained in:
Romain Quetiez
2016-06-16 08:23:15 +00:00
parent 2e71aee720
commit 52309bb1e5
7 changed files with 158 additions and 86 deletions

View File

@@ -857,7 +857,7 @@ $(function()
jTab.find('span').html(sTabText+' <img style="vertical-align:bottom" src="../images/indicator.gif">');
}
$.post(sUrl, oParams, function(data) {
var sDownloadLink = GetAbsoluteUrlAppRoot()+'pages/ajax.render.php?operation=download_document&class=Attachment&field=contents&id='+data.att_id;
var sDownloadLink = GetAbsoluteUrlAppRoot()+'pages/ajax.document.php?operation=download_document&class=Attachment&field=contents&id='+data.att_id;
var sIcon = GetAbsoluteUrlModulesRoot()+'itop-attachments/icons/pdf.png';
if (jTab != null)
{