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.
This Cache Store does not Support Tagging in LaravelIn this article, I will share with you a...
Laravel 5.4 - Get comma separated values in sqlSome time you get recird from comma sepa...
How to get the current page url using jQueryUse the syntax $(location).attr(&qu...
Laravel 5.6 - Prevent Block Multiple Login Of Same CredentialsToday we are share with you one common b...
Laravel 7 - User Roles and Permissions Tutorial without PackagesRoles and sanctions are a paramount part...