How to Redirect to Another Page After 5 Seconds using jQuery ? Last Updated : 14 Jul, 2021 Comments Improve Suggest changes Like Article Like Report In this article, we will learn, how to redirect to another page or URL after a specified time in jQuery. The built-in function used for performing the action is as follows. The setTimeout(callback, delay) function takes two parameters a callback and a time in milliseconds. When this method is called, the callback function will be executed after the specified time. With this method, the callback function is executed only one time after the specified time. Our goal is to redirect to another page after 5 seconds and this will happen only one time. We use jQuery setTimeout() function Example: HTML <!DOCTYPE html> <html lang="en"> <head> <!-- using jquery library --> <script src="https://code.jquery.com/jquery-git.js"> </script> </head> <body> <h1 style="color: green;"> Geeksforgeeks </h1> <!-- Creating a button --> <div class="redirect"> <button>Redirect me to GFG</button> </div> <!-- Script which will redirect us to another page --> <script> // click event on button $("button").click(function(){ $(".redirect").text("Redirecting....") // storing url and time let delay = 5000; let url = "https://www.geeksforgeeks.org/"; setTimeout(function(){ location = url; },5000) }) </script> </body> </html> Output: After 5 seconds, the "geeksforgeeks" home page will open. Comment More infoAdvertise with us Next Article How to Redirect to Another Page After 5 Seconds using jQuery ? H hritikrommie Follow Improve Article Tags : Web Technologies JQuery jQuery-Methods jQuery-Questions Similar Reads How to redirect to a particular section of a page using HTML or jQuery? Redirection will take the user to the desired page or section of the website that the user wants to visit. We will do it using HTML and jQuery differently. Let us take a look at the practical implementations.Table of ContentMethod 1: Using HTMLMethod 2: Using JQueryMethod 1: Using HTMLOne can use th 3 min read How to Refresh a Page using jQuery? Refreshing a page using jQuery allows you to programmatically reload the current webpage, ensuring updated content or resetting the page's state. It can be done using location.reload() method.Table of ContentUsing location.reload() MethodUsing history.go(0)Using location.replace() with Current PageR 3 min read How to reload page after specific seconds in jQuery ? A page can be reloaded after a specific number of seconds in jQuery using two approaches. Using location.reload() Method Using history.go(0) Method Using location.reload() Method: This method is used to reload the current page imitating the action of the refresh button of the browser. It has an opti 3 min read How to manage a redirect request after a jQuery Ajax call? In web development, making AJAX (Asynchronous JavaScript and XML) requests is a common practice to fetch or send data from a server without the need to refresh the entire web page. While handling responses from these requests is usually straightforward, managing a redirect request after an AJAX call 6 min read How to redirect a page to another page in HTML ? Redirecting a page in HTML involves sending users to a different web page automatically or upon interaction. This can be achieved using the anchor tag's href attribute or the meta tag with the http-equiv attribute set to refresh and the content attribute specifying the time delay and destination URL 3 min read Like