Я пытаюсь создать HTML-страницу с несколькими изображениями. он отлично работает с localhost, но если я получаю доступ через Интернет, изображения загружаются очень медленно. Как я могу кэшировать URL-адрес изображения в стиле? Проверьте приведенный ниже код HTML.Как я могу кэшировать URL-адрес изображения в стиле?
<div style="display: block;" class="collection slide-item" id="div1">
<div class="row collection type1">
<div class="title">
TRAVEL DESTINATION<div class="link">
<a class="seecollection" href="searchdb.aspx?Keyword=travel destination">See Gallery</a></div>
</div>
<div class="span12">
<a href="Search_Details.aspx?Id=1848760&key=0">
<div class="landscape thumb with_landscape" style="background-image: url(https://d3jpl91pxevbkh.cloudfront.net/imagedb-com/image/upload/1848760.jpg)">
</div>
</a>
</div>
<div class="span12">
<div class="row">
<div class="span4">
<a href="Search_Details.aspx?Id=1716438&key=0">
<div class="square thumb with_landscape" style="background-image: url(https://d3jpl91pxevbkh.cloudfront.net/imagedb-com/image/upload/1716438.jpg)">
</div>
</a>
</div>
<div class="span4">
<a href="Search_Details.aspx?Id=1838282&key=0">
<div class="square thumb with_landscape" style="background-image: url(https://d3jpl91pxevbkh.cloudfront.net/imagedb-com/image/upload/1838282.jpg)">
</div>
</a>
</div>
<div class="span4">
<a href="Search_Details.aspx?Id=1845302&key=0">
<div class="square thumb with_landscape" style="background-image: url(https://d3jpl91pxevbkh.cloudfront.net/imagedb-com/image/upload/1845302.jpg)">
</div>
</a>
</div>
</div>
<div class="row">
<div class="span6">
<a href="Search_Details.aspx?Id=1717213&key=0">
<div class="landscape thumb with_landscape" style="background-image: url(https://d3jpl91pxevbkh.cloudfront.net/imagedb-com/image/upload/1717213.jpg)">
</div>
</a>
</div>
<div class="span6">
<a href="Search_Details.aspx?Id=1842423&key=0">
<div class="landscape thumb with_landscape" style="background-image: url(https://d3jpl91pxevbkh.cloudfront.net/imagedb-com/image/upload/1842423.jpg)">
</div>
</a>
</div>
</div>
</div>
</div>
</div>
<div style="display: none;" class="collection slide-item" id="div2">
<div class="collection slide-item">
<div class="row collection type4">
<div class="title">
HOLI<div class="link">
<a class="seecollection" href="searchdb.aspx?Keyword=holi">See Gallery</a></div>
</div>
<div class="span6">
<a href="Search_Details.aspx?Id=1918857&key=0">
<div class="landscape thumb with_landscape" style="background-image: url(https://d3jpl91pxevbkh.cloudfront.net/imagedb-com/image/upload/1918857.jpg)">
</div>
</a><a href="Search_Details.aspx?Id=1869141&key=0">
<div class="landscape thumb with_landscape" style="background-image: url(https://d3jpl91pxevbkh.cloudfront.net/imagedb-com/image/upload/1869141.jpg)">
</div>
</a>
</div>
<div class="span12">
<a href="Search_Details.aspx?Id=1888875&key=0">
<div class="landscape thumb with_landscape" style="background-image: url(https://d3jpl91pxevbkh.cloudfront.net/imagedb-com/image/upload/1888875.jpg)">
</div>
</a>
</div>
<div class="span6">
<a href="Search_Details.aspx?Id=1888899&key=0">
<div class="landscape thumb with_landscape" style="background-image: url(https://d3jpl91pxevbkh.cloudfront.net/imagedb-com/image/upload/1888899.jpg)">
</div>
</a><a href="Search_Details.aspx?Id=1918847&key=0">
<div class="landscape thumb with_landscape" style="background-image: url(https://d3jpl91pxevbkh.cloudfront.net/imagedb-com/image/upload/1918847.jpg)">
</div>
</a>
</div>
</div>
</div>
</div>
Первый хит на вашей странице будет сравнительно медленным, так как браузер извлекает изображения. Когда страница будет полностью загружена, в следующий раз, когда вы перейдете на эту страницу, она будет быстрее, так как браузер теперь получит изображение из кеша. Это останется сценарием до тех пор, пока кеш не будет очищен. – Vrushank