Reputation: 1037
I have a question about bootstrap.
So basically, depending on the device, I want to show a different image. Using media queries, I was the changing the content of the depending on the device's size.
However, I just learned about the visible classes in bootstrap, and I tried them out, and they gave the same result, except that all images are loaded, and they are hidden. So I was wondering: which method is more efficient?
Upvotes: 2
Views: 45
Reputation: 125
Certainy the Bootstrap classes because it's faster mobile-friendly development. These can be used for showing and hiding content by device via media query, combined with large, small, and medium devices.
They make developers work more simple and simple and the feasibility to hide excess of ifo in smaller devices and vice versa
Upvotes: -1
Reputation: 7863
I would say the first method is more efficient because you only load the image that you need based on the device size. It would decrease the number of outgoing requests and allow faster initial page load.
Upvotes: 3