Let’s assume you’re working on a website, and you want to provide the users with the ability to reload the page by clicking a link while also preserving all the query parameters within the URL.
Most likely, your first option would be to use one of the 500 ways to reload the page with JavaScript.
But in this short tutorial, we won’t be using JavaScript, only HTML.
The solution is quite simple:
<a href="">Your Link</a>
Use a href
with empty quotes.
🎥 Take a look and see it in action:
Happy coding! 🎉
Let me know what you think about this article in the comments section below.
If you find this article helpful, please share it with others and subscribe to the blog to support me, and receive a bi-monthly-ish e-mail notification on my latest articles.