6

In this answer, I used a couple of ABC snippets. They seemed to render ok – however, upon revisiting the page, the output is actually severely mangled:

Broken result prior to refreshing

Only upon refreshing the page, does it change to the intended

After page refresh

I'd remark that ABC always had funny behaviour WRT to refreshing: after submitting an answer with ABC, the snippets would first not get rendered at all, but only after reloading the page – but at least it would show up fine when visiting a question with ABC answers for the first time. In this case, there seems to be an additional bug.


EDIT further experiments indicate that the problem seems to be indeed all about caching: I find that when opening ABC-containing pages in a completely fresh browser session (e.g. a private window) it loads fine on first try, but whenever opening a page that has already been visited before, the ABC output is broken.

3
  • Related? music.meta.stackexchange.com/questions/3556/…
    – Richard Mod
    Commented Jun 13, 2021 at 19:24
  • Yeah... but caching is one thing, the real question is why this kind of mangled result happens in the first place! It actually looks quite similar in the question you linked, from what I got. Commented Jun 13, 2021 at 19:35
  • I wonder if it's visiting an ABC answer for the first time, or visiting the larger thread not for the first time. That is, visit the thread, revisit the thread and leave an ABC answer — the ABC doesn't show correctly. On the other hand, visit the thread for the first time and leave and ABC answer — ABC shows correctly. I've not tested this, but I've definitely seen the behavior you're describing.
    – Aaron
    Commented Jun 13, 2021 at 22:40

2 Answers 2

2

I'm leaving an ABC answer, just to test out my theory from the comments — we'll see if it holds up on meta.

X:1
K:C
M:C
a b c d

TEST RESULT

After leaving a comment, I clicked on the "Home" link. I then re-visited this thread and left this answer. ABC code did not display correctly after saving the answer. Did not display correctly reloading the page. Did display correctly with the "hard" reload.

Tested on Chrome / MacBook Air

1
  • 1
    Right. It does indeed seem to be all about caching... for me (Firefox 88, Linux) it shows up fine when opening in a completely fresh session, but whenever opening a page that has been visited before, the ABC results come out mangled. Commented Jun 13, 2021 at 23:38
2

So it looks like, yes, even to an OP or other visitor, they get the right rendering only on their first visit. This is disheartening; it would be annoying to add "Hey, if this looks weird, do a hard refresh" every time we use ABCjs. I wonder if anything can be done about it...

You must log in to answer this question.

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