JavaScript and Meta Redirect In One

javascript, html

This is a way to create a guaranteed redirect on the front-end by using a combination of both a JavaScript redirect and a Meta redirect if JavaScript is turned off.

In a script tag put:

				window.location.href = 'http://www.google.com'
			

And in no script tags add:

				
			

This second is the same thing but it uses a timer to wait a certain amount before redirecting.

				var t = window.setTimeout(function(){
					window.location.href = 'http://www.google.com'
				}, 900000);