3 ms·
I've been surprised lately by the number of people that don't know about or understand HTTP headers. One discussion I saw was on a project that was trying to de
by geoffeg 4y ago
I've been surprised lately by the number of people that don't know about or understand HTTP headers. One discussion I saw was on a project that was trying to decide what language to serve a webpage in. They spent a good amount of time choosing a geo-location provider and library and then deciding what language to default to for locations that often had multiple languages. I asked why they didn't just use the Accept-Language header, which they weren't aware of.
- dmitriid 4y agoI wish more people knew about this: https://github.com/for-GET/http-decision-diagram https://github.com/for-GET/http-decision-diagram and https://github.com/for-GET/know-your-http-well https://github.com/for-GET/know-your-http-well
- wwalexander 4y agoSame thing with core UNIX commands, and so many other areas. We are doomed to incessantly reinvent the wheel and turn versatile abstractions into single-purpose complications. One must imagine Sisyphus happy.
- levymetal 4y agoGoogle famously uses geolocation to set language instead of Accept-Language. They have their reasons, which I disagree with. https://news.ycombinator.com/item?id=30638590 https://news.ycombinator.com/item?id=30638590
- CamelRocketFish 4y agoAgreed, this experience is terrible.
- Theodores 4y agoExactly. Just have jpg in the code and serve webp based on header. Problem solved. If you can do avif with better results than webp then do that. You can also vary on the data save if you are really keen.
- jbverschoor 4y agoYou’d need to serve the proper resolution too