hashfree: Clean URL Section Navigation Without the #

typescript dev.to

yoursite.com/#features, yoursite.com/#pricing, yoursite.com/#contact work just fine. But there's a difference between these and yoursite.com/features. The latter is cleaner, more shareable, and just looks more professional. If you've done a clean up like this before, you know it requires wiring up IntersectionObserver to track visible sections, intercepting anchor clicks, and using the History API to rewrite the URL. After writing this logic a couple of times across various projects, I packaged

Read Full Tutorial open_in_new
arrow_back Back to Tutorials