I want to create an html file that I can use as a link that will (eventually) redirect to the requesting URI.
I can hard code the redirect target to be the caller, but I'd rather not.
Update: As for what I will use to do it, the following comment provides a starting point:
from https://stackoverflow.com/users/665261/billy-moon
on Redirect from an HTML page:
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<meta http-equiv="refresh" content="1;url=http://example.com">
<script type="text/javascript">
window.location.href = "http://example.com"
</script>
<title>Page Redirection</title>
</head>
<body>
<!-- Note: don't tell people to `click` the link, just tell them that it is a link. -->
If you are not redirected automatically, follow the <a href='http://example.com'>link to example</a>
</body>
</html>
This will not work unless I'm willing to replace the 'http://www.example.com' with my calling page similarly in a hard-coded fashion.
Unless, there is a way to redirect to the calling URI, programmatically.
This will be a client side redirect. I don't have knowledge of the web server that my company uses and it cannot be assumed since this will be placed in production if it works. My html will be static.
Aside: The goal is to provide a link that once requested calls a third-party API, then redirects to the calling URI. (I do not have connectivity to the third-party API yet, so figuring that out is not part of the question.) Doing something in the interim, after the html has loaded, but prior to the redirect (such as calling the API/making a command-line terminal call against a scheduler) is desired, however.
But to be clear, my question is 'How do I redirect to the calling URI within an html file?'