MathJax net retrieval timeout too long #3040

Open
y-p opened this Issue Mar 20, 2013 · 11 comments

Comments

Projects
None yet
3 participants
Contributor

y-p commented Mar 20, 2013

I had net outage earlier today and launching IPNB failed to get
mathjax off the CDN (I wasn't aware you could install a local copy).

When the get timed out the resulting message was incredibley helpful,
but it only appeared after a wait of about 60 seconds, which makes it
less helpful.

Perhaps a shorter timeout would improve things? or, if you need to
give the net adequate time, perhaps it would do to pop up a status message
after a few seconds that tells the user that a dl is pending, and let's him abort
to get the full message.

Owner

minrk commented Mar 20, 2013

I don't think that's our timeout, I think that's just the browser's own request failing. I'm not sure we have access to that knob. For instance, if you load with no internet connection, rather than a barely functional one, the request will fail immediately.

Contributor

y-p commented Mar 20, 2013

I get a "Loading from CDN message" in the shell where I ran notebook immediately after launching.
That's actually mirroringa console.log a message I believe. it's only 60 secs later that the
message appears, maybe a setTimout somewhere can measure How long the fetch is taking.

I'll see if I can repro this for more details.

Contributor

y-p commented Mar 20, 2013

I was able to reproduce this:

  • if the network interface is down, the error message appears immediately
  • if it's up but the network is down (bad downstream router for example) the delay
    I described occurs.

it looks like when mathjax is loaded from the cdn, it's done using a script tag in the head,
which blocks. Example.
possibly you could load mathjax async under a controlled timeout via a script loader in the body

random google link on "how <script> can break your site".

Also, wasn't aware caching a local copy was that easy. Could be made more discoverable.
Fine by me to file under "someday".

Owner

minrk commented Mar 20, 2013

Okay, I bet we can make this async with $.loadScript call instead of a script tag. Thanks for investigating.

Owner

Carreau commented Mar 20, 2013

Okay, I bet we can make this async with $.loadScript call instead of a script tag. Thanks for investigating.

why not html5 async tag ?

Contributor

y-p commented Mar 20, 2013

is that cross-browser?

Contributor

y-p commented Mar 20, 2013

Owner

minrk commented Mar 20, 2013

We don't support IE9, so that should be fine.

Owner

Carreau commented Mar 20, 2013

IE, so in particular IE9, is an experimental aberration. I'm not even sure IPython runs on IE9.
And the async would be usefull only in some cases when network is bad.

Contributor

y-p commented Mar 20, 2013

Fair enough. I don't use IE myself, but often people care about their market share.
Personally I think they held the web back 5 years with their Idiosyncratic browser.

Owner

minrk commented Mar 20, 2013

The notebook is not big on universal support - we depend on websockets and flexible-box-model, so it only works properly in Firefox and WebKit Browsers (Chrome/Chromium/Safari). Opera and IE 10 can execute, but layout is all wonky, and we have no intention of fixing that, especially now that Opera is moving to WebKit, so should work properly in the future.

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