28

Just noticed that some sites' icons, both on home page and in "Hot Network Questions" sidebar are shifted and mixed with icons of different sites.

For example, here, the Server Fault icon has a bit of the Information Security site's shield icon showing up. The Home Improvement site's icon has also shifted, and part of the Home Improvement Meta icon appears there.

enter image description here

17
  • 11
    Happens every time a site is launched. Should fix itself in few days, usually. (Why? Because they make a new Sprites to contain the new site icon, and change the CSS. The new CSS is loaded by the browser, however the old Sprites is stuck in the cache due to bad settings on the CDN, so the browser showing new position on old Sprites, leading to the odd results we see.) Commented Jun 28, 2023 at 14:00
  • 8
    @ShadowWizardStrikesBack Yup. Programming Language Design and Implementation went from private to public roughly 24h ago.
    – Mast
    Commented Jun 28, 2023 at 14:24
  • 5
    Happens every time a site is launched + due to bad settings on the CDN Once is totally understandable. Twice is "hmm, better figure this out". After that, if they know what the problem is, why not fix it? I guess if it doesn't prevent new users and AI-bots from showing up, and just annoys the regulars, then it doesn't matter. Commented Jun 28, 2023 at 15:30
  • 1
    @manassehkatz-Moving2Codidact It could also be non-trivial to fix.
    – TylerH
    Commented Jun 28, 2023 at 16:08
  • @TylerH I can't imagine it is that hard to fix. There may be a balancing act - if the file is relatively large then you want it to cache a lot to keep traffic down, but then it doesn't replace as quickly when you want it to. Checking some things... Commented Jun 28, 2023 at 16:11
  • 1
    It is a ~ 280k png, with all the icons stacked vertically. So it definitely makes sense to cache as much as possible. My hunch (but I've already spent enough time on this and don't feel like diving into the Javascript) is that the icons are selected in some way such that when you add a couple more at the end, things selected by relative location (percentage?) don't work any more. If that's the case, the simple solution might be to preload a bunch of extra "empty" icons at the bottom. Then when you add new sites/icons you aren't changing the length of the image and the existing stuff works Commented Jun 28, 2023 at 16:23
  • @manassehkatz-Moving2Codidact the cost/tradeoff is very likely said non-trivial concern.
    – TylerH
    Commented Jun 28, 2023 at 16:23
  • as it always did and the new sites show a placeholder (blank, ?, whatever) until the cache updates. But I don't work for SE... Commented Jun 28, 2023 at 16:24
  • Given the huge number of users, these are the kinds of things that should be done, because the cost is so spread out. I suspect this is the kind of thing that could be handled (as a permanent workaround, not a one-time cache purge) in a matter of a handful of developer hours. Or they could ask ChatGPT how to fix it...which as I expected provides a useless answer Commented Jun 28, 2023 at 16:27
  • 8
    I'd wager it likely falls into the development gap of "it's an obvious bug that rarely but dependably happens". This only happens when the sprite sheet gets updated, which seemingly only happens when a new site launches, which itself isn't a frequent or regular occurrence... I imagine that makes this bug fix hard to prioritize next to more pressing matters/ feature development.
    – zcoop98
    Commented Jun 28, 2023 at 16:42
  • So I guess we can look forward to this happening again when the magical Prompt AI site starts up :-) Commented Jun 28, 2023 at 19:55
  • 1
    Should be fixed now, but I can't confirm since I'm not experiencing the issue in the first place. Are you seeing correct icons now?
    – Adam Lear StaffMod
    Commented Jun 29, 2023 at 20:02
  • 1
    @AdamLear After I cleared local browser cache again, now it is working correctly. But I still think that since this happens every time a site is added, there should be a much better fix. It basically made HNQ look positively ridiculous for a day. Commented Jun 29, 2023 at 23:04
  • 1
    @Adam I'm still seeing the wrong icons, at least from SO. I haven't cleared my browser cache (shouldn't be necessary). For example I'm seeing the Security logo on a ServerFault notification and the Workplace logo on a Worldbuilding HNQ.
    – wjandrea
    Commented Jun 30, 2023 at 14:57
  • 1
    I won't call it fixed, as nothing was done except waiting for the cache to expire on its own. It will happen, 100%, again. But I gave up fighting over this, and just sad SE refuse to spend time to really fix such esoteric bugs. :/ Commented Jul 1, 2023 at 16:34

1 Answer 1

6

As posted in the comments, addition of new site will trigger this bug. Root case is that all icons are actually coming from a single image file (sprite) that is updated slower than the CSS used to select appropriate icon:

enter image description here

Specific icon is selected using CSS, such as:

.favicon-datasciencemeta{background-position:0 -1710px}
.favicon-dba{background-position:0 -1728px}
.favicon-dbameta{background-position:0 -1746px}

When new site is added to rotation, it's icon is inserted in the middle of the sprite, not necessarily at the end. However, CSS definition for specific favicons stays the same.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .