DEV Community

Spruce Emmanuel
Spruce Emmanuel

Posted on

Display: none; worsen or improve website performance?

webDevs does display: none; worsen website performance or improves it. πŸ‘‡πŸ‘‡

Top comments (5)

Collapse
 
jensandersenwu profile image
Jens Andersen β€’

I don't think it worsens accessibility, when used correctly. Example: I have a Responsive Website where logo is changing with srcset in picture-tag and I use display:none for the pages where the logo is not to be shown in the flow of the page. I can't imagine any other way to do that as easy as with display:none in the specific css for those pages.

Collapse
 
mikemai2awesome profile image
Mike Mai β€’

It worsens accessibility.

Collapse
 
spruceemma profile image
Spruce Emmanuel β€’

Accessibility: I think it depends on how it is used

Collapse
 
mikemai2awesome profile image
Mike Mai β€’

Absolutely, it is one of the most mis-used CSS props.

Thread Thread
 
spruceemma profile image
Spruce Emmanuel β€’

I totally agree

The best way to debug slow web pages cover image

The best way to debug slow web pages

Tools like Page Speed Insights and Google Lighthouse are great for providing advice for front end performance issues. But what these tools can’t do, is evaluate performance across your entire stack of distributed services and applications.

Watch video