Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

MathJax net retrieval timeout too long #3040

Open
y-p opened this Issue · 11 comments

3 participants

@y-p

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.

@minrk
Owner

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.

@y-p

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.

@y-p

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".

@minrk
Owner

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

@Carreau
Owner

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

why not html5 async tag ?

@y-p

is that cross-browser?

@minrk
Owner

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

@Carreau
Owner

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.

@y-p

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.

@minrk
Owner

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
Something went wrong with that request. Please try again.