{"id":602,"date":"2012-05-29T02:36:19","date_gmt":"2012-05-29T02:36:19","guid":{"rendered":"https:\/\/theextremewebdesigns.com\/blog\/?p=602"},"modified":"2012-05-29T02:36:19","modified_gmt":"2012-05-29T02:36:19","slug":"redirect-page-javascript-redirect-page-javascript-after-5-seconds-1-line-code","status":"publish","type":"post","link":"https:\/\/theextremewebdesigns.com\/blog\/redirect-page-javascript-redirect-page-javascript-after-5-seconds-1-line-code\/","title":{"rendered":"Redirect Page Using After 5 Seconds Javascript Examples"},"content":{"rendered":"<p>You can<em><strong> redirect page using\u00a0<\/strong><\/em><b><i>JavaScript<\/i><\/b>\u00a0with \u00a0just 1 line of code. You also have the option of redirecting immediately or redirect after 5 seconds. Read on to find out more on how to do this.<!--more--><\/p>\n<h2>How to Redirect Page using\u00a0JavaScript\u00a0&#8211; Examples<\/h2>\n<h2>Example 1: Redirect without any delay using JavaScript<\/h2>\n<pre class=\"lang:xhtml decode:true\">&lt;script language=\"javascript\"&gt;\nwindow.location.href = \"http:\/\/www.theextremewebdesigns.com\";\n&lt;\/script&gt;<\/pre>\n<h2>Example 2: Redirect Page after 5 seconds using\u00a0JavaScript<\/h2>\n<p>If you want to <strong>redirect page using\u00a0JavaScript\u00a0after 5 seconds<\/strong>, use the following code:<\/p>\n<pre class=\"lang:xhtml decode:true\">&lt;script language=\"javascript\"&gt;\nsetTimeout(\"top.location.href = 'http:\/\/www.theextremewebdesigns.com\/'\",5000);\n&lt;\/script&gt;<\/pre>\n<h5>That&#8217;s it!<\/h5>\n<p>Do you know of any other ways to <em><strong>redirect page using javascript<\/strong><\/em>? Please feel free to share by commenting below.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>You can redirect page using\u00a0JavaScript\u00a0with \u00a0just 1 line of code. You also have the option of redirecting immediately or redirect after 5 seconds. Read on to find out more on how to do this.<\/p>\n","protected":false},"author":1,"featured_media":352,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[17,13],"tags":[29],"class_list":["post-602","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-javascript-tips-and-tricks","category-tips-and-tricks","tag-tips-tricks"],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/paBnQX-9I","jetpack_sharing_enabled":true,"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/theextremewebdesigns.com\/blog\/wp-json\/wp\/v2\/posts\/602","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/theextremewebdesigns.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/theextremewebdesigns.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/theextremewebdesigns.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/theextremewebdesigns.com\/blog\/wp-json\/wp\/v2\/comments?post=602"}],"version-history":[{"count":0,"href":"https:\/\/theextremewebdesigns.com\/blog\/wp-json\/wp\/v2\/posts\/602\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/theextremewebdesigns.com\/blog\/wp-json\/"}],"wp:attachment":[{"href":"https:\/\/theextremewebdesigns.com\/blog\/wp-json\/wp\/v2\/media?parent=602"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/theextremewebdesigns.com\/blog\/wp-json\/wp\/v2\/categories?post=602"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/theextremewebdesigns.com\/blog\/wp-json\/wp\/v2\/tags?post=602"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}