window.location property to make a page redirect, you don't need any jQuery for this. If you want to redirect the user from one page to another automatically, you can use the syntax
The benefit here is, the
replace() method does not save the originating page in the session history, meaning the user won't be able to use the browser back button to navigate to it, which prevents the user from getting redirected to the destination page once again.
Create a blank HTML file and put the following example code inside it. Now open this file in a web browser, you will be automatically redirected to the home page of this website after 10 seconds. If you notice carefully you will find that the browser back button is still disabled.
However, if you want to redirect the page when an event occurs, such as when the user click on a button element, you can just use the
window.location.href = "page_url", which produce the similar effect when someone click a link to navigates to other page.
Similarly, create another HTML file and put the following example code inside it. Now open the file in a web browser and click the button on the page, it will redirect you to the home page of this site. Also, at this time you can see the browser back button becomes active.
Hash Password with Bcrytp in NodeJsIn this tutorial, we will learn to ...
How to find the number of words in a string in PHPUse the PHP str_word_count() f...
Firebase Phone Authentication With Invisible reCaptcha in Laravel5.6Today, we are share with you how to impl...
How to get the values of selected checkboxes in a group using jQueryUse the jQuery :checked select...