The heading is self explanatory, let me give you an example:
I have the main page with a search bar and after a user hits go, instead of immediately redirecting to the search page can we wait on the main page until the data for the search page to be loaded and then redirect?
maybe something like this:
let URL="/search-page"
when_ready(URL,()=>{
window.location.href = URL;
});
Is something like this even possible?
You can check condition like the status code of the response is 200 then redirect to another page