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.

Comments on A term that describes frontend redirects

Post

A term that describes frontend redirects

+0
−3

We can talk about backend redirects when we redirect a user from example.com/1.html to example.com/2.html (without a link); the server is asked to do it by some backend-language such as PHP or by JavaScript and a 301/302 redirect is logged as done.

But let's assume that we present two different pseudo-webpages in just one given true webpage; say, we ask the server to show document X in a modal and we also ask the server that if a certain condition was met, react that document Y would be shown instead (we "frontendly redirect" the user from one pseudo-webpage to another pseudo-webpage).

Is there a term to describe such "frontend redirects" with the current web standards?

History
Why does this post require moderator attention?
You might want to add some details to your flag.
Why should this post be closed?

1 comment thread

HTTP redirection status codes (1 comment)
HTTP redirection status codes
Canina‭ wrote over 2 years ago

Using HTTP 302 is likely a bad idea because different browsers have implemented it with different behavior; it's better to use 303 or 307 as appropriate for temporary redirects, and 301 for permanent redirects (while being aware of the consequences of doing so). See e.g. Wikipedia's List of HTTP status codes: 3xx redirection and RFC 7331 section 6.4.