js: Don't bypass our cache when reloading CSS
The timestamp previously added, forces the browser to ignore its own cache and thus it doesn't transmit the `If-None-Match` header. We then re-calculate the the CSS possibly for no reason. If there is a re-calculation indeed required it should be still done now since the ETag transmitted by the browser is outdated. refs #4340
This commit is contained in:
parent
870c3e0e5b
commit
1c7e5b31bf
|
@ -111,10 +111,7 @@
|
||||||
var $oldLink = $(this);
|
var $oldLink = $(this);
|
||||||
if ($oldLink.hasAttr('type') && $oldLink.attr('type').indexOf('css') > -1) {
|
if ($oldLink.hasAttr('type') && $oldLink.attr('type').indexOf('css') > -1) {
|
||||||
var base = location.protocol + '//' + location.host;
|
var base = location.protocol + '//' + location.host;
|
||||||
var url = icinga.utils.addUrlParams(
|
var url = $(this).attr('href');
|
||||||
$(this).attr('href'),
|
|
||||||
{ id: new Date().getTime() }
|
|
||||||
);
|
|
||||||
|
|
||||||
var $newLink = $oldLink.clone().attr(
|
var $newLink = $oldLink.clone().attr(
|
||||||
'href',
|
'href',
|
||||||
|
|
Loading…
Reference in New Issue