Javascript-форум (https://javascript.ru/forum/)
-   Общие вопросы Javascript (https://javascript.ru/forum/misc/)
-   -   Помогите с кэшированием!!! (https://javascript.ru/forum/misc/61566-pomogite-s-kehshirovaniem.html)

Andrey_55 24.02.2016 12:24

Помогите с кэшированием!!!
 
Добрый день! Есть счетчик:

<div class="textrotator_example2"></div>

<script type="text/javascript">
function Rotator2(start_from){
var phrases = ["1","2","3","4","5"];
var total = phrases.length;
var interval = 5000;
if(void 0 === start_from){
start_from = 0;
}

$(".textrotator_example2").text(phrases[start_from]).animate({"opacity":"1"}, 500, function(){
if(start_from >= (total-1)){
setTimeout(function(){
$(".textrotator_example2").animate({"opacity":"0"} , 500, function(){
Rotator2();
});
}, interval);
}else{
start_from++;
setTimeout(function(){
$(".textrotator_example2").animate({"opacity":"0"} , 10,function(){
Rotator2(start_from);
});
}, interval);

}

})
}
$(document).ready(function(){




/*rotator*/
if($(".textrotator_example2").length > 0){
Rotator2();
}
/**/




})//ready end

</script>

возможно ли его кэшировать на стороне клиента?

Заранее благодарен!

destus 24.02.2016 13:39

Andrey_55,
через файл манифеста http://htmlbook.ru/html/html/manifest

Andrey_55 25.02.2016 19:23

Спасибо! Буду разбираться!


Часовой пояс GMT +3, время: 07:59.