2 Answers. Show activity on this post. If you are asking about the css display: none then the answer is the video will still be loaded over the mobile network but it would not be visible to the end user.
This doesn't impact the browser rendering of the DOM but it does impact the site content load. If you are going to be toggling the visibility of the image, then this is not a big problem, it may even be better if it is already loaded.
Setting display to none will render the page as though the element does not exist. visibility: hidden; will hide the element, but the element will still take up the space it would if it was fully visible.
The trick to hiding any element on your web page is to insert either a " display: none; " or " visibility: hidden; " rule for that element. The " display: none; " rule not only hides the element, but also removes it from the document flow.
If you hide an image by setting the display property to none
, does the browser still load that image file via HTTP Request? Because I have a list of images, their display property is set to none
, except the first image which is the default picture. Once the users click the next button, I want to show the image 2 and set the display property for the other images to none
. I am asking this to make my website faster.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With