News for hackers. Stuff that matters.
Re:Google breaks search for Firefox users because of bad UA ... by dannysullivan on Tuesday January 09, 2024 @12:43PM (#38929165)
I work for Google Search. Apologies for this! It’s been fixed now and posted to our search status dashboard https://status.search.google.com/incidents/hySMmncEDZ7Xpaf9i...
Re:Google breaks search for Firefox users because of bad UA ... by QuinnyPig on Tuesday January 09, 2024 @01:45PM (#38930137)
Fortunately, the issue was reported in the proper / only place to get support from Google: the front page of Hacker News.
Re:Google breaks search for Firefox users because of bad UA ... by rtsil on Tuesday January 09, 2024 @02:40PM (#38930883)
Thank god for procrastination!
Re:Google breaks search for Firefox users because of bad UA ... by emeril on Tuesday January 09, 2024 @04:04PM (#38932073)
LOL
Re:Google breaks search for Firefox users because of bad UA ... by lovelyviking on Thursday January 11, 2024 @06:33PM (#38961147)
And what approach would be effective to get any buttons work on login page of ChatGPT?

In IOS 14 ‘ login’ button simply does nothing regardless of the browser.

It’s been reported and yet last time I’ve checked it doesn’t work. It’s more than two months already and as it seems simply no body give a sh….

Re:Google breaks search for Firefox users because of bad UA ... by jedahan on Tuesday January 09, 2024 @01:03PM (#38929510)
Would love to hear what the bug and/or fix was
Re:Google breaks search for Firefox users because of bad UA ... by stephenr on Tuesday January 09, 2024 @01:23PM (#38929813)
I'm more interested in why ua sniffing is considered acceptable for this.
Re:Google breaks search for Firefox users because of bad UA ... by sangnoir on Tuesday January 09, 2024 @01:45PM (#38930136)
On the server-side, parsing the UA string is the best & fastest way to figure out which browser is on the other end or the connection. This can need to happen before you load any JS - this is commonly used to decide which JS bundles to load. When put under the microscope, browser have inconsistent behaviors and occasional regressions from version to version (e.g. performance with sparse arrays)
Re:Google breaks search for Firefox users because of bad UA ... by 93po on Tuesday January 09, 2024 @06:35PM (#38933934)
How much JavaScript is needed to accept my text input and provide auto complete options? Pretty wild we need to worry about browser compatibility to do this
Re:Google breaks search for Firefox users because of bad UA ... by sangnoir on Tuesday January 09, 2024 @08:25PM (#38934923)
> How much JavaScript is needed to accept my text input and provide auto complete options?

If you're talking about Google's homepage, the answer is "a lot". You can check for yourself - go to google.com, select "view source" and compare the amount of Closure-compiled JavaScript against HTML markup.

Re:Google breaks search for Firefox users because of bad UA ... by junon on Tuesday January 09, 2024 @08:41PM (#38935069)
I think you've missed the point. Google's primary web search feature could, in theory, be implemented without a line of JavaScript. That's how it was years and years ago anyway.
Re:Google breaks search for Firefox users because of bad UA ... by zugi on Tuesday January 09, 2024 @09:15PM (#38935315)
I use Firefox with the NoScript addon and google.com still works just fine.
Re:Google breaks search for Firefox users because of bad UA ... by sangnoir on Wednesday January 10, 2024 @02:40PM (#38942210)
I did not miss the point, I gave an answer based on the ground-truth rather than theory.

> Google's primary web search feature could, in theory, be implemented without a line of JavaScript

...and yet, in practice, Google defaults to a JavaScript-heavy implementation. Search is Google's raison d'être and primary revenue driver, I posit it therefore is optimized up the wazoo. I wouldn't hastily assume incompence given those priors.

Re:Google breaks search for Firefox users because of bad UA ... by stephenr on Wednesday January 10, 2024 @04:37AM (#38938225)
The important word in the question you quoted is needed.

Google homepage is 2MB. Two fucking megabytes. Without JS, it's 200K.

I can't be the only person who remembers when Google was known for even omitting technically optional html tags on their homepage, to make it load fast - they even documented this as a formal suggestion: https://google.github.io/styleguide/htmlcssguide.html#Option...

Re:Google breaks search for Firefox users because of bad UA ... by Kharacternyk on Wednesday January 10, 2024 @01:17PM (#38941447)
Thank you for the link. I had no idea about most of the optional tags. It looks ugly when taken to extremes, though.
Re:Google breaks search for Firefox users because of bad UA ... by sangnoir on Wednesday January 10, 2024 @02:49PM (#38942311)
> I can't be the only person who remembers when Google was known for even omitting technically optional html tags on their homepage, to make it load fast

This was back when a large fraction of search users were on 56k modems. Advances in broadband connectivity, caching, browser rendering, resource loading scheduling, and front-end engineering practices may result in the non-intuitive scenario where the 2MB Google homepage in 2024 has the same (or better!) 99-percentile First-Meaningful-Paint time as a stripped-down 2kb homepage in 2006.

The homepage size is no longer that important because how much time do you save by shrinking a page from 2MB to 300kb on a 50mbps connection with a warm cache?Browser cache sizes are much larger than they were 10 years ago (thanks to growth in client storage). After all, page weight is mostly used as a proxy for loading time.

Re:Google breaks search for Firefox users because of bad UA ... by stephenr on Wednesday January 10, 2024 @07:42PM (#38945792)
I'm sorry you're going to have to pick an argument and stick to it before I can possibly hope to respond.

Either performance is so critical that a few kb to do feature detection is too much, or line performance has improved so much that 2MB of JavaScript for a text box and two buttons is "acceptable".

You can't have it both ways.

Re:Google breaks search for Firefox users because of bad UA ... by sangnoir on Wednesday January 10, 2024 @09:13PM (#38946568)
> You can't have it both ways.

Your argument goes against empirical evidence in this instance. You can have it "both ways" when client-side feature detection is the slower choice on high bandwidth connections and you want to consistently render the UI within 200ms.

Performance goes beyond raw bandwidth, and as with all things engineering, involves tradeoffs: client-side feature detection has higher latency (server-client-server round trip and network connection overheads) and is therefore unsuitable for logic that executes before the first render of above-the-fold content. All of this is pragmatic, well-known and not controversial among people who work on optimizing FE performance. Your no-serverside-detection absolutism is disproved by the many instances of UA-string parsing in our present reality.

Re:Google breaks search for Firefox users because of bad UA ... by stephenr on Thursday January 11, 2024 @02:39AM (#38948985)
> Your no-serverside-detection absolutism is disproved by the many instances of UA-string parsing in our present reality.

By your logic, because McDonalds is popular, it must be a healthy choice then.

Re:Google breaks search for Firefox users because of bad UA ... by hansvm on Wednesday January 10, 2024 @08:02PM (#38946002)
I've definitely had to code up alternative front-ends routed through a server I own to access Google on slow connections. If it takes too long your browser just gives up, and the site isn't just "unusable" (slow to the point of being painful), it's actually unusable.
Re:Google breaks search for Firefox users because of bad UA ... by sangnoir on Wednesday January 10, 2024 @09:19PM (#38946616)
I don't doubt your experience - but my mention of the 99th percentile was intentional.
Re:Google breaks search for Firefox users because of bad UA ... by hansvm on Thursday January 11, 2024 @12:42AM (#38948212)
99th percentile is fairly arbitrary. At Google's scale, that's a $2B yearly loss in customers they could have satisfied who went elsewhere. That's roughly 200FTEs who could be dedicated to the problem more efficiently than working on their other business concerns. Is not delivering a shit website when the connections are garbage that hard of a problem?
Re:Google breaks search for Firefox users because of bad UA ... by j5155 on Wednesday January 10, 2024 @02:49AM (#38937417)
Google is an advertising company. I’m sure they’re collecting quite a bit more then just your text input
Re:Google breaks search for Firefox users because of bad UA ... by 93po on Wednesday January 10, 2024 @11:22AM (#38940274)
Of course, that's why there's 1.8MB of compressed JavaScript for a text box and an image. My point being that's it's silly and I'm exasperated with the state of the internet
Re:Google breaks search for Firefox users because of bad UA ... by stephenr on Tuesday January 09, 2024 @07:33PM (#38934494)
2002 called and they want their terrible development practices back.
Re:Google breaks search for Firefox users because of bad UA ... by stephenr on Wednesday January 10, 2024 @01:07AM (#38936799)
It's wild to think that everything we've collectively learned as an industry is being forgotten, just 20 years later.

- We're on the verge of another browser monopoly, cheered on by developers embracing the single controlling vendor;

- We already have sites declaring that they "work best in Chrome" when what they really mean is "we only bothered to test in Chrome".

- People are not only using UA sniffing with inevitable disastrous results, they're proclaiming loudly that it's both necessary and "the best" solution.

- The amount of unnecessary JavaScript is truly gargantuan, because how else are you going to pad your resume?

I mean really what's next?

Are we going to start adopting image slice layouts again because browsers gained machine vision capabilities?

Re:Google breaks search for Firefox users because of bad UA ... by cuddlyogre on Wednesday January 10, 2024 @09:47AM (#38939470)
We're also back to table layouts with grid, albeit a lot more usable this time around.
Re:Google breaks search for Firefox users because of bad UA ... by kedean on Wednesday January 10, 2024 @12:58PM (#38941229)
I don't recall that there was ever anything inherently wrong with using tables for layout, except that it was a misuse of tables so we were told it wasn't "semantic". Thus you had years of people asking on forums how to emulate tables using a mess of floating divs until flexbox/grid came around. In retrospect, tables are also clearly incompatible with phone screens, but that wasn't really a problem at the time.
Re:Google breaks search for Firefox users because of bad UA ... by nolok on Wednesday January 10, 2024 @02:28PM (#38942107)
One, it made the code unreadable and impossible to maintain properly, especially since most of those table where generated straight out of photoshop or whatever.

Two, it was an accessibility nightmare.

At least modern grid design fix those

Re:Google breaks search for Firefox users because of bad UA ... by sangnoir on Wednesday January 10, 2024 @04:12PM (#38943223)
> People are not only using UA sniffing with inevitable disastrous results, they're proclaiming loudly that it's both necessary and "the best" solution.

Since you're replying to my comment and paraphrasing a sentence of mine, I'm guessing I'm "people".

I'm curious to hear from you on what - if any - is a better alternative that can be used to determine the browser identity or characteristics (implied by name and version) on the server side? "Do not detect the browser on the server side" is not a valid answer; and suggests to me the person proffering it as an answer isn't familiar with large-scale development of performant web-apps or websites for heterogenous browsers. A lot of browser inconsistencies have to be papered over (e.g. with polyfills or alternative algorithms implementations), without shipping unnecessary code to browsers that don't need the additional code. If you have a technique faster and/or better that UA sniffing on the server side, I'll be happy to learn from you.

"Do feature JavaScript feature detection on the client" is terrible for performance if you're using it to dynamically load scripts on the critical path.

Re:Google breaks search for Firefox users because of bad UA ... by stephenr on Wednesday January 10, 2024 @07:43PM (#38945795)
I'm sorry you're going to have to pick an argument and stick to it before I can possibly hope to respond. Either performance is so critical that a few kb to do feature detection is too much, or line performance has improved so much that 2MB of JavaScript for a text box and two buttons is "acceptable". You can't have it both ways.
Re:Google breaks search for Firefox users because of bad UA ... by Uptrenda on Tuesday January 09, 2024 @01:24PM (#38929819)
It's ok, sure it's stressful when something like this happens. Software is a hard field and the amount of things that can go wrong is immense. When I think about how few errors and downtime some of the larger services have I realize how much work must be involved.
Re:Google breaks search for Firefox users because of bad UA ... by code_biologist on Tuesday January 09, 2024 @01:33PM (#38929964)
I'd divide "things going wrong" into forced and unforced errors. Your upstream service providers sending subtly malformed data is a forced error. It happens. Doing user agent sniffing for presentation, poorly, is an unforced error.

It's not amateurish to have problems. It is amateurish (or malicious) to have problems caused by this specific class of issue.