“Redirect Javascript” Search Answer from StackOverflow Page “How do I redirect to another webpage?”

Posted on Posted on September 26, 2021, 2:39 pm by Kyle Christopher Blanchard (@kylecblanchard).

 Modified on Modified on September 27, 2021, 2:44 pm by Kyle Christopher Blanchard (@kylecblanchard).

Permalink Permalink: “Redirect Javascript” Search Answer from StackOverflow Page “How do I redirect to another webpage?”— (The Permalink/bookmark/link location/url/address: —https://www.kylecblanchard.net/2021/09/26/stackoverflow/redirect-javascript-search-answer-from-stackoverflow-page-how-do-i-redirect-to-another-webpage/—) — Bookmark this link.

Reader (and note to future self),

I have been looking for a way to use the “?” (question mark) and trail with a string while writing a web link. My purpose is in trying to send the clicked link elsewhere. However, I am not wanting to code a permanent redirect as in redirecting to a moved address or site location, nor am I using it to pass search terms and their results from a search database (i.e., https://stackoverflow.com/search?q=redirect+javascript). I am not at this time of writing needing it to trackback affiliate links or such, just wanting to use the method mainly because of its looking so proper; and that so many other websites use redirects and navigation methods that use the question mark (“?”) seamlessly within visiting their site and its pages.

I found a StackOverflow (the link opens in a new tab) article question and its answers that seem to be what I’ve been searching for in this instance.

Screenshot | Source: https://stackoverflow.com/questions/503093/how-do-i-redirect-to-another-webpage
Screenshot | Source: https://stackoverflow.com/questions/503093/how-do-i-redirect-to-another-webpage

In the page of results, I found when looking for “redirect javascript” the page “How do I redirect to another webpage?” and the section which seems to be what I am looking for is the answer section that starts and says, “So, the question is how to make a redirect page, and not how to redirect to a website?
You only need to use JavaScript for this. Here is some tiny code that will create a dynamic redirect page.”

Screenshot | Source: https://stackoverflow.com/questions/503093/how-do-i-redirect-to-another-webpage
Screenshot | Source: https://stackoverflow.com/questions/503093/how-do-i-redirect-to-another-webpage
Screenshot | Source: https://stackoverflow.com/questions/503093/how-do-i-redirect-to-another-webpage
Screenshot | Source: https://stackoverflow.com/questions/503093/how-do-i-redirect-to-another-webpage

(“How do I redirect to another webpage?” https://stackoverflow.com/questions/503093/how-do-i-redirect-to-another-webpage – the link opens in a new tab)

The modified code I am using then is:

	<script>
    // <!-- https://stackoverflow.com/questions/503093/how-do-i-redirect-to-another-webpage | "How do I redirect to another webpage?" -->
	// So, the question is how to make a redirect page, and not how to redirect to a website?
	// You only need to use JavaScript for this. Here is some tiny code that will create a dynamic redirect page.
	//	< script>
    //	var url = window.location.search.split('url=')[1]; // Get the URL after ?url=
    //	if( url ) window.location.replace(url);
	//  </ script>
	// So say you just put this snippet into a redirect/index.html file on your website you can use it like so.
	// http://www.mywebsite.com/redirect?url=http://stackoverflow.com
	// And if you go to that link it will automatically redirect you to stackoverflow.com.
	var url = window.location.search.split('url=')[1]; // Get the URL after ?url=
    if( url ) window.location.replace(url);
	</script>

It seems as if I have run across this article in the past, because, when I looked to bookmark the link in Chrome while reading it, the bookmark symbol already showed it in my bookmarks. So I changed its location in my bookmarks to find it more quickly the next time I need to refer to this aid.



Listen to The Prose Edda (Annotated) by Snorri Sturluson on Audible. https://www.audible.com/pd/B07ZRXRNB1?source_code=ASSOR150021921000R



Ida Aftermath Update: One (I i)

Posted on Posted on September 4, 2021, 9:08 am by Kyle Christopher Blanchard (@kylecblanchard).

 Modified on Modified on September 4, 2021, 9:08 am by Kyle Christopher Blanchard (@kylecblanchard).

Permalink Permalink: Ida Aftermath Update: One (I i)— (The Permalink/bookmark/link location/url/address: —https://www.kylecblanchard.net/2021/09/04/uncategorized/ida-aftermath-update-one-i-i/—) — Bookmark this link.

Hello, reader.

Ida Aftermath Update: One (I i)

Here, in Thibodaux (Lafourche Parish), LA, still only generator/Generac power. Ida surely left a mark. 


Still no power for me here.

Posted on Posted on September 2, 2021, 4:40 pm by Kyle Christopher Blanchard (@kylecblanchard).

 Modified on Modified on September 2, 2021, 4:40 pm by Kyle Christopher Blanchard (@kylecblanchard).

Permalink Permalink: Still no power for me here.— (The Permalink/bookmark/link location/url/address: —https://www.kylecblanchard.net/2021/09/02/uncategorized/still-no-power-for-me-here/—) — Bookmark this link.

Still no power for me here.


https://m.facebook.com/story.php?story_fbid=10101930027337234&id=69301836&sfnsn=mo