Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Welcome to the Power Users community on Codidact!

Power Users is a Q&A site for questions about the usage of computer software and hardware. We are still a small site and would like to grow, so please consider joining our community. We are looking forward to your questions and answers; they are the building blocks of a repository of knowledge we are building together.

Post History

75%
+4 −0
Q&A A term that describes frontend redirects

As already stated, of course it's possible to do a redirection in the front end by telling the browser to request a different URL. Using Javascript is one possible method (some companies apparently...

posted 3y ago by Canina‭  ·  edited 3y ago by Canina‭

Answer
#3: Post edited by user avatar Canina‭ · 2021-08-23T08:26:21Z (over 3 years ago)
  • As [already stated](https://powerusers.codidact.com/posts/283640/283641#answer-283641), of course it's possible to do a redirection in the front end by telling the browser to request a different URL. Using Javascript is one possible method ([some companies apparently actually do that](https://www.troyhunt.com/why-no-https-the-2021-version/)); using `<meta http-equiv="refresh">` is another. With the Javascript approach, you can even have the client pick the target URL based on some heuristic that is impractical to determine on the server.
  • **However, that's not what you appear to discuss in your question.**
  • What you are asking about seems to be whether it's possible to have the server "react" to some (unspecified here) condition by showing either "document X" or "document Y" in a modal in a larger web page. (Keeping in mind that a web page "modal" is really a web page, client construct; it's only modal insofar as something in the web page itself makes the other parts of the web page inaccessible while the modal is being displayed.)
  • Which, of course, is also possible. But since the server is making the selection, it can't be front-end, because front-end is generally in these contexts taken to mean *something done by the client*. Which, when considering web pages, will typically *but not always* be a web browser.
  • To do what you are asking, the two obvious options are to **either include the raw file contents in the larger page using whatever means your web development stack provides for that, or include the URL to one page or another as a document reference** (for example for an `<iframe>` source).
  • No front-end logic required.
  • As [already stated](https://powerusers.codidact.com/posts/283640/283641#answer-283641), of course it's possible to do a redirection in the front end by telling the browser to request a different URL. Using Javascript is one possible method ([some companies apparently actually do that](https://www.troyhunt.com/why-no-https-the-2021-version/)); using `<meta http-equiv="refresh">` is another. With the Javascript approach, you can even have the client pick the target URL based on some heuristic that is impractical to determine on the server.
  • **However, that's not what you appear to discuss in your question.**
  • What you are asking about seems to be whether it's possible to have the server "react" to some (unspecified here) condition by showing either "document X" or "document Y" in a modal in a larger web page. (Keeping in mind that a web page "modal" is really a web page, client construct; it's only modal insofar as something in the web page itself makes the other parts of the web page inaccessible while the modal is being displayed.)
  • Which, of course, is also possible. But since the server is making the selection, it can't be front-end, because front-end is generally in these contexts taken to mean *something done by the client*. Which, when considering web pages, will typically *but not always* be a web browser.
  • To do what you are asking, the two obvious options are to **either include the raw file contents in the larger page using whatever means your web development stack provides for that, or include the URL to one page or another as a document reference** (for example for an `<iframe>` source). In the former case the contents of that file must fit appropriately wherever it gets included; in the latter case, the page referenced must be a complete web page in its own right.
  • No front-end logic required.
#2: Post edited by user avatar Canina‭ · 2021-08-22T08:21:54Z (over 3 years ago)
  • As [already stated](https://powerusers.codidact.com/posts/283640/283641#answer-283641), of course it's possible to do a redirection in the front end by telling the browser to request a different URL. Using Javascript is one possible method ([some companies apparently actually do that](https://www.troyhunt.com/why-no-https-the-2021-version/)); using `<meta http-equiv="refresh">` is another. With the Javascript approach, you can even have the client pick the target URL based on some heuristic that is impractical to determine on the server.
  • **However, that's not what you appear to discuss in your question.**
  • What you are asking about seems to be whether it's possible to have the server "react" to some (unspecified here) condition by showing either "document X" or "document Y" in a modal in a larger web page.
  • Which, of course, is also possible. But since the server is making the selection, it can't be front-end, because front-end is generally in these contexts taken to mean *something done by the client*. Which, when considering web pages, will typically *but not always* be a web browser.
  • To do what you are asking, the two obvious options are to **either include the raw file contents in the larger page using whatever means your web development stack provides for that, or include the URL to one page or another as a document reference** (for example for an `<iframe>` source).
  • No front-end logic required.
  • As [already stated](https://powerusers.codidact.com/posts/283640/283641#answer-283641), of course it's possible to do a redirection in the front end by telling the browser to request a different URL. Using Javascript is one possible method ([some companies apparently actually do that](https://www.troyhunt.com/why-no-https-the-2021-version/)); using `<meta http-equiv="refresh">` is another. With the Javascript approach, you can even have the client pick the target URL based on some heuristic that is impractical to determine on the server.
  • **However, that's not what you appear to discuss in your question.**
  • What you are asking about seems to be whether it's possible to have the server "react" to some (unspecified here) condition by showing either "document X" or "document Y" in a modal in a larger web page. (Keeping in mind that a web page "modal" is really a web page, client construct; it's only modal insofar as something in the web page itself makes the other parts of the web page inaccessible while the modal is being displayed.)
  • Which, of course, is also possible. But since the server is making the selection, it can't be front-end, because front-end is generally in these contexts taken to mean *something done by the client*. Which, when considering web pages, will typically *but not always* be a web browser.
  • To do what you are asking, the two obvious options are to **either include the raw file contents in the larger page using whatever means your web development stack provides for that, or include the URL to one page or another as a document reference** (for example for an `<iframe>` source).
  • No front-end logic required.
#1: Initial revision by user avatar Canina‭ · 2021-08-22T08:18:54Z (over 3 years ago)
As [already stated](https://powerusers.codidact.com/posts/283640/283641#answer-283641), of course it's possible to do a redirection in the front end by telling the browser to request a different URL. Using Javascript is one possible method ([some companies apparently actually do that](https://www.troyhunt.com/why-no-https-the-2021-version/)); using `<meta http-equiv="refresh">` is another. With the Javascript approach, you can even have the client pick the target URL based on some heuristic that is impractical to determine on the server.

**However, that's not what you appear to discuss in your question.**

What you are asking about seems to be whether it's possible to have the server "react" to some (unspecified here) condition by showing either "document X" or "document Y" in a modal in a larger web page.

Which, of course, is also possible. But since the server is making the selection, it can't be front-end, because front-end is generally in these contexts taken to mean *something done by the client*. Which, when considering web pages, will typically *but not always* be a web browser.

To do what you are asking, the two obvious options are to **either include the raw file contents in the larger page using whatever means your web development stack provides for that, or include the URL to one page or another as a document reference** (for example for an `<iframe>` source).

No front-end logic required.