If I display:none on a webpage component, does that component still load? If I use it to hide entire div tags and it’s contents is it still there? Should I worry about load time if I do this a lot?
If I display:none on a webpage component, does that component still load? If I
Share
Yes the contents are still there, you have just set it to not display at the browser level.
Unless you have a lot of stuff that is set to display:none then its probably not going to affect load time in the browser in any significant way, you may be affecting the download time to the client especially if you are not gzipping.
If there is work being done on the server to load this data it may affect load time on the server.
If you have a lot of stuff that is set to display:none then you could load some of it via ajax.