Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IFrameNavigator’s start inconsistencies #4

Open
JayPanoz opened this issue Mar 15, 2019 · 0 comments
Open

IFrameNavigator’s start inconsistencies #4

JayPanoz opened this issue Mar 15, 2019 · 0 comments

Comments

@JayPanoz
Copy link
Contributor

JayPanoz commented Mar 15, 2019

So I’m currently debugging that but once again, it’s unclear when I’ll be able to commit it, and it also depends on how we’ll be handling the merges between Bokbasen and Jellybooks. So filling the issue to let people know.

There’s quite a nasty inconsistency related to iframe’s loading across browsers. And we’ve been impacted in public beta – sigh.

By default, it doesn’t have a src in the codebase, which means (non-chromium) MSEdge and Firefox are forcing an about:blank as a src when the IFrameNavigator is started.

In other words, what should be:

  1. Load manifest
  2. handle iframe load

is the following in those browsers:

  1. handle iframe load with about:blank
  2. load manifest
  3. handle iframe load with spine item

The only thing that is preventing the reader to fail in MS Edge and Firefox on subsequent uses is that the manifest is requested every time a chapter is loaded.

When I tried to minimise the number of such requests because I saw quite mind-blowing stuff (e.g. 8 requests of the same manifest to the server within a few seconds) i.e. request it on start then use the one in memory, all hell broke lose, and I found myself in a never-ending loop of blank pages – which explained the bug some users had encountered in public beta.

In other words, you’d better protect yourself against about:blank as the currentLocation in the handleIframeLoad method – it’s still unclear to me but apparently, Chrome and Safari are supposed to do the same in the foreseeable future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant