This is no new issue, people have reported odd behaviour on Firefox for a long time, and this bug specifically has been mentioned multiple times:
- https://www.reddit.com/r/firefox/comments/w6itmq/why_is_it_on_firefox_on_android_i_cant_look_at/
- https://github.com/mozilla-mobile/fenix/issues/16767
- https://www.reddit.com/r/firefox/comments/kq6hya/google_review_url_not_working_on_firefox_mobile/
- https://webcompat.com/issues/56933
- https://www.reddit.com/r/firefox/comments/k2z5kx/google_review_link_is_not_working_in_firefox/
The fault seems to be pretty clearly with Google, since many people suggest using Google Search Fixer, and all this plugin does is lie to websites and pretend we are using google Chrome instead of Firefox.
Of course, I cannot tell every client that uses firefox to first install an extension before scanning a QR code, but I also don't want to serve broken webpages to clients, even if they are a minority. So I devised a plan.
I already have the VPS that runs this website running nginx, I can send everyone to a link on this server, and then redirect them based of the User-Agent they reported:
- If they are using anything except Firefox Android, send them directly to the review link google provides, they will be greeted with pretty page ready with textbox type their review.
- If they are using Firefox, I forward them to our Google Maps page, and they will have to manually find the "Leave a review" button. Not good, but better than an error.
Here is the nginx configuration that achieves this:
location /redirect/greview {
if ($http_user_agent ~* 'Mobile.*Firefox') {
return 301 https://www.google.com/maps?cid=9500000000000000063;
}
return 301 https://g.page/r/AAAAAAAAAAAAAAAAAAA6A6EEBE/review;
}
This block goes inside your normal server block, and then you point clients to https://example.com/redirect/greview or whatever location you use.
The process is transparent, nginx will quickly return the HTTP return code for redirecting the client, the only downside is the extra delay, be cause people have to talk to my server instead of going directly to Google, but at least no one is served a broken page.
I hope this solution can help other small business owners that don't to serve a broken user experience to their clients.