Jump to content
antonjuulnaber

Update guide for on-scroll-header

Recommended Posts

Hi :)

The guide on making a scrolling header is great, but it relies on javascript running every time you scroll. That is really expensive (resource-wise) and contributes to a laggy an unresponsive website.

I think the guide should be updated to use sticky css-elements instead of js. This method does not have the same performance issues, and I'd argue it's an easier and more elegant solution. The new guide is pretty much already written here.

The support for sticky elements is not perfect, so there is a discussion to be had about whether to prioritize browser support or performance, but i think at the very least the page should have a yellow box, mentioning that the sticky element is a better solution.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...