3

I want to show the following popup if the user browser is outdated: enter image description here

I check the client browser and return a 302 redirect to MySite/ErrorPages/OutdatedBrowser page if their browser is too old.

I am using SEMRUSH and I noticed that SEMRUSH crawler gets redirected to MySite/ErrorPages/OutdatedBrowser and their audit tool is giving me warning about this redirect (it says that the page ranking will be spitted between the two pages).

  1. Is it a bad practice to redirect to "outdated" browser page?
  2. Should I show the "outdated" message on the same page?

The reason I decided to use the redirect option is that, the "outdated" popup is extra html that I prefer to keep out of my pages.

8
  • 2
    "extra html" - the code from browser-update.org (no affiliation) is around 250 bytes of javascript. That is hardly anything...
    – Steve
    Commented Sep 4, 2021 at 5:41
  • 1
    @Steve: That's my question... I would prefer to keep those extra bytes off my page if possible (browser-update.org, requires an additional .js library too) Commented Sep 4, 2021 at 6:00
  • Why do you need to check for "outdated browsers" to begin with? (This question makes me feel I've just stepped back 10+ years!)
    – MrWhite
    Commented Sep 4, 2021 at 12:37
  • 1
    "the browser update site says that their widget is lightweight at 3KB" - except that update.min.js that the HTML snippet downloads is nearly 10KB? (And that HTML snippet is nearer 360 bytes.) But the downloaded script is cached and served by Cloudflare. @StephenOstermiller @Steve
    – MrWhite
    Commented Sep 5, 2021 at 10:08
  • 2
    @MrWhite I guess I can't trust the slick marketing website to be truthful and up-to-date. :( Firefox now has a separate cache per site which limits the effectiveness of caching for cross-site libraries: arstechnica.com/gadgets/2020/12/… Commented Sep 5, 2021 at 10:11

2 Answers 2

3

Generally, you shouldn't redirect to an entirely separate page or display an obtrusive "popup" to outdated browsers unless maybe the site/application is entirely inaccessible to those on the "outdated browser".

On most informational websites the content should still be accessible, even though it may not look as intended or be "broken" in places. If the content can still be consumed then an unobtrusive banner (on the same page) would be far more preferable.

Redirecting to a separate page (or displaying an obtrusive popup) can deliver a bad user experience and alienate the user. Particularly with today's auto-updating and update-notifying browsers, if a user is using an outdated browser it may be for good reason as they have likely taken additional steps to prevent the browser from updating. Or they are using older hardware (older OS) that does not support the newer browsers. And users in a corporate environment often don't have control over their browsers/machines so cannot simply update it.

So, if a user is using an outdated browser it is often because they can't or don't want to update it. They should still be able to consume the content if possible.

Try opening this very same website in IE

AFAICT this website only displays an "unobtrusive banner" to IE11 and early versions of Edge. Other "outdated browsers", including earlier versions of IE do not get any notification. (Maybe because it is deemed that users of these browsers should be able to update via Windows Update?) The website content can still be consumed on even ancient browsers.

I check the client browser and return a 302 redirect to ...
... the "outdated" popup is extra html that I prefer to keep out of my pages.

If you are returning a "302 redirect" then you must already be performing the browser check server-side, in which case any additional "outdated banner/popup" HTML/JS should only be served to those browsers that actually "need" it. This "extra HTML" does not need to be present in the page that is served to everyone else if you are performing this test server-side to begin with.

SEMRUSH crawler gets redirected

This would certainly seem to be an error in your browser detection script. The default action needs to be "no banner/popup". And, as @StephenOstermiller mentioned in comments, bots certainly need to be excluded.

2
  • Thanks for your answer... I was showing "outdated message" instead of the page content, which I assume means that the crawlers could not find any content on my website? I guess this must have prevented my site from being ranked in search engines? I implemented a solution similar to StackExchange... just showing a warning on top of the page. Commented Sep 5, 2021 at 22:58
  • @HoomanBahreini "which I assume means that the crawlers could not find any content on my website?" - although, as mentioned above, search engine bots should not have been redirected in the first place (a bot is not an outdated browser). And, to clarify, you still need to exclude the "warning/banner" from search engine bots, otherwise, the banner itself will get indexed as part of the content which will also be detrimental to SEO.
    – MrWhite
    Commented Sep 6, 2021 at 12:36
1

How you'd technically implement it would be a thing of its own, but perhaps you could back to a separate version of the page if the browser is outdated.

In my opinion that might be a better experience if someone is browsing the web they might not want to update their browser that second because they're in the middle of a task.

As long as you make sure the separate page for outdated browsers lists the official page as the canonical URL, Google won't consider it duplicate content. Additionally, by applying the meta robots noindex tag, should be safe from unwanted indexation but Google does sometimes ignore this and index no-index pages anyways.

A 302 redirect would be appropriate.

It's saying to search engines this might not be that permanent. It might change in the future, it might change depending on who accesses it, on the device used, or the user’s location. Moreover, it shouldn't be cached.

7
  • 3
    I would also suggest making sure that bots don't get identified as outdated browsers by checking for bot|crawl|slurp|spider Commented Sep 5, 2021 at 9:13
  • 1
    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? Commented Sep 5, 2021 at 9:32
  • @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. Commented Sep 5, 2021 at 17:46
  • 1
    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. Commented Sep 5, 2021 at 22:42
  • 1
    @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).
    – MrWhite
    Commented Sep 7, 2021 at 17:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.