bugfix: safari flashing with complex project#12508
Conversation
we don't have complete control over where 'before body' really is, with so many components contributing to the array via mergeConfigs so use a postprocessor for this
|
This is much better, but still has flashing on some pages. In particular, flashing is likely on the tutorial pages. EDIT: Not seeing flashing on any pages a day later, probably influenced by caching? |
|
@cscheid, please test the second website in Safari before merging. I think this is a safe change but can't think of any way to test this automatically. |
|
This is really short and sweet, I like it. I will test it, yeah. |
|
Context: the flashing I'm talking about in this message only appears in pages where we have the following combination:
Good news! The flashing is much improved on Safari. Bad news! The flashing is much worse on Firefox. I'm investigating. |
|
Firefox! That's my primary browser. I see flashes if I mash cmd-R and it can't keep up, but otherwise I see the same behavior as Safari, some flashing on the Get Started tutorials if not cached or cache disabled, have not seen flashing on other pages. |
|
I see the behavior pretty consistently when I:
|
|
Yeah, exactly, it's the same as the Safari bug but more prominent. Tested on slow Windows machine. As expected Firefox same but does not cache at all, the three tutorial pages always blink. Chrome and Edge fine of course. |
|
Ugh. It's the redirect we're doing in javascript. |
Put
quarto-html-before-bodyscript really at top at top of body.We don't have complete control over where Pandoc's 'before body' really is, with so many components contributing to the array via mergeConfigs.
So use an HTML postprocessor for this.
Not sure how to automatically test this, but here is a demo using GitHub Pages.
quarto-web built without this fix
https://gordonwoodhull.github.io/quarto-web-safari-bug/
quarto-web built with this fix
https://gordonwoodhull.github.io/quarto-web-safari-bugless/