<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>redirect url Archives - Info Spot</title>
	<atom:link href="https://info-spot.net/tag/redirect-url/feed/" rel="self" type="application/rss+xml" />
	<link>https://info-spot.net/tag/redirect-url/</link>
	<description>Info Spot blog</description>
	<lastBuildDate>Fri, 29 Nov 2024 18:20:58 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.2</generator>

<image>
	<url>https://info-spot.net/wp-content/uploads/2024/11/cropped-icon-32x32.png</url>
	<title>redirect url Archives - Info Spot</title>
	<link>https://info-spot.net/tag/redirect-url/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>How to Redirect to Another Webpage using JavaScript?</title>
		<link>https://info-spot.net/how-to-redirect-to-another-webpage-using-javascript/</link>
					<comments>https://info-spot.net/how-to-redirect-to-another-webpage-using-javascript/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Fri, 29 Nov 2024 07:01:50 +0000</pubDate>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[js redirect]]></category>
		<category><![CDATA[location href]]></category>
		<category><![CDATA[location replace]]></category>
		<category><![CDATA[redirect url]]></category>
		<guid isPermaLink="false">https://info-spot.net/?p=621</guid>

					<description><![CDATA[<p>JavaScript can redirect the users from current page to another webpage (different URL) with and without requiring any&#8230;</p>
<p>The post <a href="https://info-spot.net/how-to-redirect-to-another-webpage-using-javascript/">How to Redirect to Another Webpage using JavaScript?</a> appeared first on <a href="https://info-spot.net">Info Spot</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>JavaScript can redirect the users from current page to another webpage (different URL) with and without requiring any manual action (like clicking a link). This can be achieved in JavaScript using the <strong>window.location</strong> object and it will allow us to redirect programmatically.</p>



<h4 class="wp-block-heading" id="using-locationhref-to-redirect-to-another-webpage">Using window.<strong>location.href</strong></h4>



<p>The window location <strong>href </strong>property is used to set or return the full URL of the current page. The Location href property can also be used to set the href value redirect to another link. The Location href property returns a string that contains the entire URL of the page, including the protocol (http, https, etc). </p>



<p><strong>Syntax</strong></p>



<pre class="wp-block-code"><code>window.location.href = "URL"</code></pre>



<h4 class="wp-block-heading" id="using-locationreplace-to-redirect-to-another-webpage">Using&nbsp;<strong>location.replace() Method</strong></h4>



<p>The l<strong>ocation replace() </strong>method<a href="https://www.geeksforgeeks.org/html-dom-location-replace-method/" target="_blank" rel="noreferrer noopener"> </a>is used to replace the current document with the specified one. This method is different from the assign() method as this removes the current document from the document history, therefore it is not possible to go back to the previous document using the ‘back’ button. </p>



<p><strong>Syntax</strong></p>



<pre class="wp-block-code"><code>location.replace("URL");</code></pre>



<h4 class="wp-block-heading" id="3-how-to-redirect-browser-window-back-using-javascript-">How to redirect browser window back using JavaScript ?</h4>



<p>There are two approaches used to redirect the browser window back:</p>



<ul class="wp-block-list">
<li>Using <strong>history.back()</strong> Method</li>



<li>Using <strong>history.go()</strong> Method</li>
</ul>



<p></p>
<p>The post <a href="https://info-spot.net/how-to-redirect-to-another-webpage-using-javascript/">How to Redirect to Another Webpage using JavaScript?</a> appeared first on <a href="https://info-spot.net">Info Spot</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://info-spot.net/how-to-redirect-to-another-webpage-using-javascript/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
