jsMath Global Mode
One of jsMath's weaknesses is its speed (or lack thereof). Since jsMath has to interpret each mathematical expression and then typeset it, this can be a time-consuming process. To help improve the performace, jsMath includes an equation cache where it stores the typeset versions of the expressions that you are viewing, and it uses that cache if the same expression shows up again. This is helpful to a degree, but only when exactly the same expression occurs more than once on the page. (There is also a sub-expression cache that helps when several formulas include common terms.)
To help overcome this problem, jsMath has a "Global Mode". This uses a "frame set" that contains a main page where the equation cache can be stored, and an inner frame in which the jsMath document is shown. When you link to a new page from that document, only the contents of the inner frame are refreshed, and the outer frame is left unchanged. Since jsMath stores its cache in the outer frame, that means the cache will remain intact even as you move from page to page. Thus the performance of jsMath should improve as you view more pages.
To initiate Global Mode, open the jsMath Control panel (using the "jsMath" button usually found at the lower right-hand corner of the page) and press the "Go Global" button. (Some pages may initiate Global Mode automatically, so if you see a "Go Local" button, you are already in Global Mode.) The page should reload, and you probably will not see any visial difference, except that the "jsMath" button will now say "jsMathGlobal" instead. In Global Mode, the equation cache will be preserved as you move from page to page.
It is important to realize that Global Mode uses an HTML frame set, even though it appears that you are just viewing a single page. The use of framesets introduces the usual complications that accompany pages that use frames. In particular, printing and refreshing the page becomes more delicate, and the address bar and window title show the location and title of the outer frame not the page in the inner frame. If you reload the main page while in Global Mode, this will reinitialize the frameset, and the global equation cache will be lost. Worse yet, in some browsers, you will go back to the page you were on when you first started using Global Mode. Depending on the browser you use, printing the main page may not produce the results you expect: some browsers will print only the portion of the inner frame that actually appears on screen, rather than the whole document, and may include the scrollbars and other window decorations.
JsMath tries to alleviate the problems in several ways. First, the jsMath Control Panel includes "Print" and "Reload" buttons that will let you easily print or reload the contents of the inner frame. Some browsers provide contextual menu items that allow you to print or reload individual frames, but not all do, so jsMath provides that alternative for you. Second, jsMath will set the window title to the title of the inner document (when it can), so that the effect is the same as though there were no frames involved.
The main difficulty is that jsMath can't set the address area to show the location of the inner page (since that would cause a new page to open in place of the frameset). Instead, jsMath's Global Mode provides an optional Global Control Bar where the actual page location can be displayed (and changed). This bar is not shown by default, but you can activate it by clicking on the word "Global" in the "jsMathGlobal" button, or by clicking the "Controls" button on main jsMath Control Panel. Either of these should open a small panel at the top of the page that includes an address area and several action buttons.
The address area shows the address of the document being shown in the inner frame, so you can more easily tell what page is being displayed. You can also edit this address and press RETURN (or the "Go" button) to view a new page instead. Note, however, that this address bar does not include address auto-completion, even if the browser's main address bar does.
The other buttons include:
- Print: this prints the document showing in the inner frame. The browser's main print button (or menu item) would print the full frameset, which might not be what you want, whereas this button only prints the contents of the inner frame.
- Reload: this reloads the document showing in the inner frame without clearing the equation cache. The browser's main reload button (or menu item) would cause the frameset to be reinitialize, including the equation cache, and it might also send you to the page where you originally started using Global Mode. This button avoids both those problems.
- Go Local: this button would exit Global Mode and send you back to using jsMath without the global equation cache. There is also a "Go local" button on the jsMath Control Panel that does the same thing.
- Empty: this empties the global equation cache. In rare circumstances, the cached equation from one page may not be correct for another page that uses the same mathematical formula. In that case, you can clear the cache and then reload the page.
- Hide: this hides the Global Control Bar, saving you screen space, and making the page appear more like it would when jsMath is not in Global Mode. You can reopen the Global Control Bar by clicking on the word "Global" in the jsMath button, or by using the "Controls" button on the jsMath Control Panel.
It is possible for links inside the inner frame to cause their linked page to open as the main page, rather than staying within the inner frame. This would cause the global frame to be lost, and so jsMath would effectively go back to local mode. Depending on the settings in the jsMath Options panel, the next page that uses jsMath could cause Global Mode to start up again automatically, but that might not be the case. Since jsMath does not control the contents of the pages to which you link, there is little that it can do to prevent this.
If you view a jsMath page in Global Mode and then navigate to other offsite locations, jsMath's global frame will continue to be present (the idea is that you might navigate offsite temporarily, and then go back to pages with jsMath that could still take advantage of the global equation cache, so the frame is not removed until you explicitly request it). Even though you can't see the jsMath outer frame, it may still be there, and unless the jsMath button is visible, it may be hard to tell. One indication is that the address bar shows the
jsMath-global.htmlfile and will not change as you travel to new pages. If you wish to leave Global Mode when the jsMath Control Panel or Global Control Bar are not available, the only way to do this is to type a new address into the address bar to replace the jsMath global file. That will take you to the new page and remove the jsMath global frame.
Finally, you should be aware that going to global mode will cause the current page to be reloaded. If the page was generated as a result of submitting a form, this could cause the form to be submitted a second time. Most browsers will warn you about that, and ask whether it is OK to resubmit the data, but not every browser does so. Also note that hiding or showing the Global Control Bar can cause the page to be reloaded in some browsers.