kalaba2003
kalaba2003

Reputation: 1229

Site loading speed & Bootstrap "Carousel" images loading

Does Bootstrap "Carousel" load all images at one time? If so, does it reduce site loading speed and increase loading time?

I do not know how Bootstrap Carousel javascript file works. When next icon is clicked, if next image is loaded via ajax, there is no problem. But if all images are loaded at one time, I think it reduces page speed.

Any idea?

Upvotes: 0

Views: 3839

Answers (2)

user927887
user927887

Reputation: 39

Bootstrap does not do any magic lazy loading behind the scenes as Tigran points out. However, many browsers do not request images that are hidden through "display:none". So when inspecting network traffic with, for example the Chrome browser, you will see that the images are in practice "lazily" loaded.

An outdated and almost unreadable list of browsers with this behaviour can be found here: http://www.w3.org/2009/03/image-display-none/results

Upvotes: 1

Tigran Petrossian
Tigran Petrossian

Reputation: 1168

Bootstrap carousel just rotates it's items. If images are defined by src attribute, images will be loaded with the rest of the page.

You can use some lazy loading solutions to load images sequentially - Google search

Upvotes: 2

Related Questions