How Page Re-direction works ?
Example 1:
This is very simple to do a page redirect using JavaScript at client side. To redirect your site visitors to a new page, you just need to add a line in your head section as follows:
<head> <script type="text/javascript"> <!-- window.location="http://www.newlocation.com"; --> </script> </head> |
To understand it in better way you can Try it yourself.
Example 2:
You can show an appropriate message to your site visitors before redirecting them to a new page. This would need a bit time delay to load a new page. Following is the simple example to implement the same:
<head> <script type="text/javascript"> <!-- function Redirect() { window.location="http://www.newlocation.com"; } document.write("You will be redirected to main page in 10 sec."); setTimeout('Redirect()', 10000); //--> </script> </head> |
Here setTimeout() is a built-in JavaScript function which can be used to execute another function after a given time interval.
To understand it in better way you can Try it yourself.
Example 3:
Following is the example to redirect site visitors on different pages based on their browsers :
<head> <script type="text/javascript"> <!-- var browsername=navigator.appName; if( browsername == "Netscape" ) { window.location="http://www.location.com/ns.htm"; } else if ( browsername =="Microsoft Internet Explorer") { window.location="http://www.location.com/ie.htm"; } else { window.location="http://www.location.com/other.htm"; } //--> </script> </head> |
Source: Page redirection
Hello Admin,
ReplyDeleteI read your article and it is a great article. you share all information about redirection in java script.
Regards,
Thanks
Mansi Sharma
Digital marketing is a powerful tool for businesses, but originality is essential. This article explores effective strategies to remove plagiarism in digital marketing. From content creation to citation practices, we will delve into actionable tips to ensure authenticity, enhance brand credibility, and achieve success in the digital landscape.
ReplyDeleteif you want to know more Click
This comment has been removed by the author.
ReplyDeleteEmbarking on a camping adventure in Ladakh, amidst its majestic mountains and pristine wilderness, is an extraordinary journey that rejuvenates the spirit and leaves lasting memories.
ReplyDeleteNunkuncamp Shargole
This comment has been removed by the author.
ReplyDeleteAs the demand for skilled digital marketers continues to rise, choosing the best institute to acquire comprehensive digital marketing knowledge and skills becomes crucial. Among the multitude of options in Delhi, one institute truly stands out as the epitome of excellence in digital marketing education. In this article, we unveil the unparalleled digital marketing institute in Delhi that is poised to shape your path towards remarkable success.
ReplyDeleteBest Digital Marketing Institute in Delhi
This comment has been removed by the author.
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteDigital marketing is an integral part of the modern business landscape, employing diverse techniques to connect and engage with online audiences. It encompasses a wide range of strategies that utilize digital channels such as social media, search engines, and email marketing to promote products or services and elicit desired actions from potential customers
ReplyDeleteBest Digital Marketing Institute in Sarojini Nagar
Digital marketing refers to the utilization of various online channels, platforms, and technologies to promote products, services, or brands to a target audience. It involves leveraging digital mediums such as the internet, social media, search engines, email, mobile apps, and other digital platforms to reach potential customers and drive business growth. The primary objective of digital marketing is to engage with the audience, establish brand awareness, increase website traffic, generate leads, and ultimately convert these leads into customers.
ReplyDeleteBest Digital Marketing Institute in Madipur
Digital marketing encompasses a broad spectrum of marketing efforts that leverage electronic devices and the internet to promote products and services. These efforts span across multiple online channels, including search engines, social media platforms, email, content marketing, and more.
ReplyDeleteBest Digital Marketing Institute in Jhandewallan
One of the notable aspects of CA Firms is their ability to provide accurate and transparent financial reporting. They assist clients in maintaining clear and reliable financial records, which is essential for making informed business decisions and demonstrating financial health to stakeholders.
ReplyDeleteCA Firm in Janakpuri
Rajouri Garden is also a hub for digital marketing education and training. Local institutes and training centers offer courses that equip individuals with the skills needed to excel in this field. These courses cover essential aspects of digital marketing, providing both beginners and experienced professionals with the knowledge to thrive in the digital landscape.
ReplyDeleteBest Digital Marketing institute in Rajouri Garden
AUTISM, ALS, CANCER, COPD, ADHD, DDD, PTSD, or any kind of chronic disease/disorder can be so draining but literally has a cure and also a way to improve on them. Have you been searching for a cure or away to cope with the above mentioned and you haven’t found any and you’re about to give up. Well, I’m here to let you know that all hope is not lost, Dr kokobi is here to help you. His herbal Centre is a place where you can get a permanent cure, solution and also some vital info on how you can deal with any kind of disorder/disease you’re currently suffering from. I'm giving this testimony because he has helped me a lot. So kindly message him now via email:kokobiherbalremedycentre@gmail.com
ReplyDeletewebsite: https://kokobiherbalremedycentre.weebly.com