Reload Web Page Using JQuery (RWPUJ)

Hello guys, back again with mr. root, this time I want to share again about a case that I once experienced while working on a script. At that time, I was building a web UI/UX to display a map along with several markers that represent the coordinates of road damage or supporting infrastructure.

As usual, the problem is so familiar to me. The system that I created turned out to be unable to display data in real time, this problem can certainly be used to fill in the conclusion list in my thesis report lol. Okay, apart from that, I need a little tricky to do it, namely by reloading or refreshing the web page. Now, the question is how can I do it on the client side?

The solution is to use jQuery

The reload() function has several parameters that can be set to true, which means the page will be reloaded / refreshed without cache, if you want otherwise, then you can just set it to false. Consider the following example.

$('#YOUR-ELEMENT-ID').click(function() {
    // Reload the current page without the browser cache
    window.location.reload(true);
});

If you want to learn more about this topic, please read the documentation  HERE .


Post a Comment

Previous Next

نموذج الاتصال