function cacheImage(url) {
var img = new Image();
img.src = url;
}
cacheImage('/page2.png');
cacheImage('/page3.png');
img.cache {
display: none;
}
<html>
<head>
*подключаем стиль*
*подключаем скрипт*
</head>
<body>
Главная страница
<img class='cache' src='/image2.png'>
</body>
</html>
var minute = data.timer.substring(0, data.timer.indexOf(':'));
var second = data.timer.substring(data.timer.indexOf(':') + 1);
var $timer = $('#timer');
if (minute.length == 1) {
minute = '0' + minute;
}
if (second.length == 1) {
second = '0' + second;
}
if ($timer.length) {
$timer.find('#timer-1').text(minute[0]);
$timer.find('#timer-2').text(minute[1]);
$timer.find('#timer-3').text(second[0]);
$timer.find('#timer-4').text(second[1]);
}
});