Earlier quoted context omitted.
Why shouldn't it show it in the same state? Seems like a reasonable thing to do.
If it was a static page, then sure. But for dynamic pages or SPAs it more often than not leads to going back to a page in a broken state. Other browsers have better heuristics for when this cache is used. So Safari's behavior is unexpected, even so that the big guys are taken by surprise it seems. I don't really mind either way, the main thing is that it's inconsistent. It's not a huge deal, but it's just one of many…
WebKit Quirks
21–30 of 91 posts
Re: WebKit Quirks
#22Earlier quoted context omitted.
Why shouldn't it show it in the same state? Seems like a reasonable thing to do.
If it was a static page, then sure. But for dynamic pages or SPAs it more often than not leads to going back to a page in a broken state. Other browsers have better heuristics for when this cache is used. So Safari's behavior is unexpected, even so that the big guys are taken by surprise it seems. I don't really mind either way, the main thing is that it's inconsistent. It's not a huge deal, but it's just one of many…
From my perspective this is an application bug, and relying on heuristics is a bad idea. If a change should be made, it should be to make it explicitly the web apps task to handle on its own.
Re: WebKit Quirks
#23I bet it's fun being responsible for developing and deploying on those sites. Works in CI and dev, but deploying to production makes the browser behave differently! Nice surprise!
topPrivatelyControlledDomain(url.host().toString()).startsWith("google.")
The definition of `topPrivatelyControlledDomain` means that `google.github.io` would qualify, or `google.works.aero`... Pretty much anybody can abuse that to get any of the quirks modes available in this file.
See the full list here:
Re: WebKit Quirks
#24Earlier quoted context omitted.
If it was a static page, then sure. But for dynamic pages or SPAs it more often than not leads to going back to a page in a broken state. Other browsers have better heuristics for when this cache is used. So Safari's behavior is unexpected, even so that the big guys are taken by surprise it seems. I don't really mind either way, the main thing is that it's inconsistent. It's not a huge deal, but it's just one of many…
Sounds more like an issue with the web apps to me.
But imagine Windows opening an app, drawing the last known interface state and then skipping half of the app startup code. Should apps deal with that too, or would it be considered a Windows bug?
Re: WebKit Quirks
#25Anyone who's read a few Old New Thing posts would know that Windows must be full of similar checks.
Re: WebKit Quirks
#26Earlier quoted context omitted.
Why shouldn't it show it in the same state? Seems like a reasonable thing to do.
If it was a static page, then sure. But for dynamic pages or SPAs it more often than not leads to going back to a page in a broken state. Other browsers have better heuristics for when this cache is used. So Safari's behavior is unexpected, even so that the big guys are taken by surprise it seems. I don't really mind either way, the main thing is that it's inconsistent. It's not a huge deal, but it's just one of many…
But it wouldn't surprise me if "web apps" makes this hard for some reason.
Re: WebKit Quirks
#27Earlier quoted context omitted.
Oh, WebKit are absolutely not the only people doing this. Opera used to with their Presto engine, and I’m pretty sure I’ve seen a similar list in Gecko, though I can’t find it now. At the end of the day, this is the only way that non-Chrome browsers can meet Google’s hegemony, unless they give up and adopt Chromium itself. The opportunity cost of switching is too low for browser manufacturers no to have these workaro…
> At the end of the day, this is the only way that non-Chrome browsers can meet Google’s hegemony Except these quirks include a whole lot more than just Google. Some of the domains in there: 1. nytimes 2. twitter 3. ralphlauren 4. baidu 5. warbyparker 6. nfl 7. gizmodo 8. microsoft I'm not sure what each different piece of code does but there is many more domains in there.
Re: WebKit Quirks
#28> domain.endsWith("hulu.com") Huh, does that mean it would also apply on "thisisnothulu.com"? Most other endsWith calls seem to do e.g. `domain.endsWith(".hulu.com")` to only match subdomains.
From the name of the quirk, I'm not sure this is an issue though.
Re: WebKit Quirks
#29Earlier quoted context omitted.
Sounds more like an issue with the web apps to me.
There is no spec to conform to to work around these cache issues. (IE was even worse in the past, shutting down the back forward cache if devtools were opened. Have fun debugging that) But imagine Windows opening an app, drawing the last known interface state and then skipping half of the app startup code. Should apps deal with that too, or would it be considered a Windows bug?
Re: WebKit Quirks
#30Earlier quoted context omitted.
Sounds more like an issue with the web apps to me.
There is no spec to conform to to work around these cache issues. (IE was even worse in the past, shutting down the back forward cache if devtools were opened. Have fun debugging that) But imagine Windows opening an app, drawing the last known interface state and then skipping half of the app startup code. Should apps deal with that too, or would it be considered a Windows bug?
> History mechanisms and caches are different. In particular history mechanisms SHOULD NOT try to show a semantically transparent view of the current state of a resource. Rather, a history mechanism is meant to show exactly what the user saw at the time when the resource was retrieved.
— https://tools.ietf.org/html/rfc2616#section-13.13
If a web application depends on the browser reloading the page when the user presses the back button, then I think it’s fair to call that a bug in the web application. It is “trying to show a semantically transparent view of the current state of the resource”, which is explicitly called out as incorrect behaviour by the spec.