How to avoid flicker while loading MathJax strings

523 views
Skip to first unread message

Sanjay Vel

unread,
Mar 28, 2011, 5:49:58 AM3/28/11
to MathJax Users
MathJax strings are loaded after a small flicker every time when the
page is loaded. How to avoid this? This is my sample code

<html>
<head>
<title>MathJax TeX Test Page</title>
<script type="text/javascript" src="\MathJax\MathJax.js"></
script>
</head>

<body>
$$ \frac{3}{4}$$
$$ \begin{split} \mbox{What is the reciprocal of } \frac{6}
{8} ? \end{split} $$
</body>
</html>

Davide P. Cervone

unread,
Mar 28, 2011, 10:02:26 AM3/28/11
to mathja...@googlegroups.com

nageh

unread,
Mar 28, 2011, 1:41:00 PM3/28/11
to MathJax Users
I noticed a different kind of flickering, which occurs during
rendering of the page. The result is that formulas that are already
typeset disappear (blank) for a short time and then reappear again.

What is much more annoying is that initial loading of MathJax scripts
occasionally freezes the entire PC including sound for about 2
seconds. It seems that this is only happening when scripts are not in
the cache, and this problem may be related to Firefox, dunno. (I use
Firefox 4.0 on Vista.) Would be interesting to know if others are
experiencing the same issue.

-nageh

On 28 Mrz., 16:02, "Davide P. Cervone" <d...@union.edu> wrote:
> See the discussion at
>
>        http://groups.google.com/group/mathjax-users/browse_thread/thread/239...

nageh

unread,
Mar 31, 2011, 4:12:29 AM3/31/11
to MathJax Users
It seems that the lockup is related to loading webfonts. And the 2
secs was pretty optimistic; it is more like 4-5 secs during which the
OS freezes. Dev's, can you try to reproduce this? Is it a Windows
issue? Firefox issue?

Thanks,
-nageh

Davide P. Cervone

unread,
Apr 2, 2011, 1:10:38 PM4/2/11
to mathja...@googlegroups.com
I have seen firefox have a substantial delay the first time a web page
tries to access a unicode code point (presumably it is collecting data
on fonts and the characters they have available, but that is just a
guess on my part). MathJax uses the unicode font positions quite
heavily, and so the first time it requests one probably causes Firefox
to go through this font-data-collection exercise. I don't know if it
locks up the whole system or not, but it does take a few seconds (and
is probably disk and cpu intensive) so it wouldn't surprise me if it
did.

Does this happen for you on EVERY page, or just the first one (that
uses MathJax) after you restart Firefox?

Davide

Reply all
Reply to author
Forward
0 new messages