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

Handle gracefully DOM hijacking without blank screen #25

Open
mstn opened this issue Jul 24, 2014 · 1 comment
Open

Handle gracefully DOM hijacking without blank screen #25

mstn opened this issue Jul 24, 2014 · 1 comment

Comments

@mstn
Copy link

mstn commented Jul 24, 2014

The phase between document.open and document.close takes a bit of time and a blank screen is shown for few milliseconds while the new document is loading. I would like to get rid of this white screen.

A rough solution is to use a splashscreen that covers everything until the end of hijacking. However, I'd prefer to show a loading indicator instead of a fixed picture. I googled a bit and it seems that it is possible to have animated native splashscreen in Android, but I'd prefer to not write native code.

Immediately after document.close, document.readyState is 'loading', not 'complete'. I guess document.{close,open} are async. I doubt a loader indicator can be shown while document is loading.

Does anyone have any idea about how to make dom loading as fast as possible?

@zeroasterisk
Copy link
Owner

Indeed this is something I'm going to be working on. I don't think I can
totally resolve it but I can get a chunk of the way there by inlining the
JS and CSS assets via localStorage and (injecting on DOM hijack).

if I remember correctly I experimented with only hijacking part of the DOM
which would have allowed you to only switch to meteor after it was
loaded... But it didn't work for me... feel free to experiment and let me
know what you come up with.
On Jul 24, 2014 12:49 PM, "Marco" notifications@github.com wrote:

The phase between document.open and document.close takes a bit of time and
a blank screen is shown for few milliseconds while the new document is
loading. I would like to get rid of this white screen.

A rough solution is to use a splashscreen that covers everything until the
end of hijacking. However, I'd prefer to show a loading indicator instead
of a fixed picture. I googled a bit and it seems that it is possible to
have animated native splashscreen in Android, but I'd prefer to not write
native code.

Immediately after document.close, document.readyState is 'loading', not
'complete'. I guess document.{close,open} are async. I doubt a loader
indicator can be shown while document is loading.

Does anyone have any idea about how to make dom loading as fast as
possible?


Reply to this email directly or view it on GitHub
#25.

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

No branches or pull requests

2 participants