legit

Fork of https://git.icyphox.sh/legit

Workaround degraded UX due to BFCache BFCache is the worst thing happened in the web. The technology itself is not bad, but how it's introduced (or who introduced) was the problem. A company that tries to advertise their hardware, or accurately say, deceive their hardware's customer to them believing their hardware is faster than competitors, started deplying BFCache widely to their browser that is only available one on the hardware. Because the intention, and there is no spec for back/forward behavior, they introduced the behavior to existing web pages without opt-out mechanism. Their defence is "this is good for users, and only situation this is not desirable is navigation after logout", which is completely bullshit. Client-side apps relies on established "script reload on navigation" were broken and had to add workaround or adapt to this breaking change. They didn't care as their goal is to create software monopoly using their proprietry app store, and web apps are "competitor" to those motherfuckers' products. I could have set "Cache-Control: no-store" but decided to "adapt" BFCache because: * disabling BFCache by using that header is side-effect, so "primary effect" takes place (I have a plan for cache design and this is not a good time to introduce the change) * those mfs can change heuristic or break web by another method, and this is more future-proof. Avoiding (fighting against) the cache is a hack, unfortunately. * whether showing cached content is good in this software is debatable, but considering there is no cache design yet, supporting BFCache is better than the prior state. The new code has consistent code style albeit little bit inefficient on storage access. I believe future changes naturally will follow this pattern and will put "sync" code into "pageshow" handler.

Changes

1 changed files (+133/-101)