Timeline for Should I use 302 redirect when user's browser is out of date?
Current License: CC BY-SA 4.0
9 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Sep 7, 2021 at 17:49 | comment | added | MrWhite |
@StephenOstermiller Regarding your earlier comment about the Edge version number in the user-agent string (now deleted) eg. Edge/12.10240 . This version number (in earlier versions of Edge) refers to the "EdgeHtml Browser Engine version", rather than the overall "Browser Version" - this does differ quite a bit from the version of the browser itself. However, in later (chromium-based 2019-) versions, the version number in the UA-String refers to the "Blink Browser Engine version" and it seems the browser version has changed to match this, but is now denoted by Edg/ (no e ).
|
|
Sep 5, 2021 at 22:42 | comment | added | Stephen Ostermiller♦ |
JavaScript is a fine choice for implementing it. It could redirect to another page by setting the location . It doesn't need to be a 302 redirect.
|
|
Sep 5, 2021 at 18:49 | comment | added | Mike Ciffone | Updated my answer, thanks for the feedback guys! Side note though - @StephenOstermiller it makes sense after your explanation using rewrites is a bad idea. How would you feel about handling it with JS then? If for example feature detection was used instead of UA detection we wouldn't be able to provide that 302, right? | |
Sep 5, 2021 at 18:42 | history | edited | Mike Ciffone | CC BY-SA 4.0 |
Updated because my original answer was very poor :)
|
Sep 5, 2021 at 18:01 | comment | added | Mike Ciffone | @MrWhite Yeah like I mentioned to Stephen I am sure there are plenty of issues, as I'm not the most experienced in this but wanted to give it a shot to get some engagement going and perhaps learn something in the process. Also I think you're right about not needing the technical part | |
Sep 5, 2021 at 17:46 | comment | added | Mike Ciffone | @StephenOstermiller Yeah I will be the first to say I'm not the most experienced in this, much of what I included was intended to be pseudo code (not a verbatim copy and paste. I'd love to learn from how you'd do this properly whether you could show how you'd implement by editing my answer or a completely separate answer. | |
Sep 5, 2021 at 9:32 | comment | added | Stephen Ostermiller♦ | Checking for outdated browsers is too complicated to implement in rewrite rules. You need to be able extract versions, parse them to numbers, and use numerical comparisons. It is kind of possible to do that with just regular expressions, but the regex get long and hairy. Look at just the two digit case in this StackOverflow question: RegEx: How can I match all numbers greater than 49? | |
Sep 5, 2021 at 9:13 | comment | added | Stephen Ostermiller♦ |
I would also suggest making sure that bots don't get identified as outdated browsers by checking for bot|crawl|slurp|spider
|
|
Sep 5, 2021 at 5:22 | history | answered | Mike Ciffone | CC BY-SA 4.0 |