While there are many examples of sticky headers available, my experience using a JavaScript approach has been successful for smaller tables with 100-150 rows. However, when dealing with larger tables containing 600-700+ rows, the script tends to slow down significantly and may take 10-15 seconds to load the results.
This delay in loading is not ideal from a user-friendly perspective, especially considering how impatient customers can be.
I suspect the reason for the slower performance is due to the sheer amount of data being handled. The script essentially clones the table, removes the header on one clone and the body on the other, allowing for a scrolling feature with a sticky header.
In light of this, my question is: what is the most efficient way, in terms of speed, to create a table with a sticky header? Is it possible to achieve this effect using CSS alone, eliminating the need for JavaScript?
Thank you.