css - skip downloading of images on small screens -


on pages this one show list of artists appearing @ festival. on small screen sizes (e.g. cell phone) artist images hidden media query rule:

@media (max-width: 480px) {     .artistentry img {         display: none;     } } 

in order speed page rendering , reduce amount of content on page. however, afaik, image still downloaded, page load time quite sluggish on small devices. there way prevent image being downloaded on small screen?

i suggestion @joe regarding background images. if that's not fit site approach might work adaptive images

it automatically resize images based on user's viewport , breakpoints set. if work you, best of both worlds ... keep images mobile users plus faster downloads

good luck!

update

looking @ page in more detail, think problem largely because have lot of images , since aren't defining image sizes in page html, browser has download image thumbnails , determine size before can start layig out page. in testing, took 12 sec before page starts render.

i have 2 ideas speed things up.

include image sizes artist thumbnails. doing make page start rendering earlier.

alternatively, instead of showing artists in default, i'm wondering if let isotope of heavy lifting you. if showed headline artists default, i'm reasonably sure speed percieved page speed 50%. check changing section of html

<div class="spacer" id="lineup-filter"> <h4>filter lineup artist</h4> <label class="lineup-toggle"> <input type="radio" name="lineup"  id="all-artists">show artists</label>  <label class="lineup-toggle"> <input type="radio" name="lineup" checked="checked" id="headline-artists-only">show headline artists only</label>  </div> 

Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -