I have had the chance to look at what you have done, and the cookie idea is clever, but it has some problems:
The cookie will not be available on the first page that the viewer sees (since the cookie comes from the previous page that the user has viewed, and on their first page, there is no previous page). This is probably not too bad, since the first page they will see generally will be a login page or the website home page, and neither is likely to need mathematics. Even if it had math, it would be OK to use mimeTeX for that.
Third, the way the the tex filter interprets the delimiters for mathematics and the way jsMath does do not always agree. For example, with the tex filter, double-dollar signs introduce in-line mathematics, while in jsMath they are for displayed equations (centered in a separate paragraph). This means that the page will look different for different users, depending on whether they get the jsMath filter or the tex filter.
I have an alternative suggestion for you that overcomes all these problems. The idea is to let the browser make the decision about which filter to use, rather than the filter. That is, the filter inserts both the jsMath form and the tex form (in a clever way) and the browser shows only one of them. Here's the way it works:
Note that the same page is sent to every user, regardless of their browser settings, so caching will work, and this doesn't rely on cookies, so it works on the first page the user sees (and also continues to work if the user switches browser settings while viewing the Moodle site). Since the tex-filter is inserting the jsMath SPAN itself, this method does not rely on the tex2math component of jsMath (which is what the jsMath filter uses to convert dollars or other delimiters into the SPAN and DIV tags that jsMath uses), so the results will be consistent no matter which version the user sees of the mathematics (jsMath or mimeTeX).
Finally, if the tex-filter is made to insert the jsMath SPAN tags and the NOSCRIPT tags only when the jsMath filter is active, then if the jsMath filter is disabled by the site administrator, the tex filter will operate as is used to, regardless of the user's browser settings. Furthermore, jsMath can continue to operate on other tags (if you wish), independently of the tex filter.
So I think this takes care of all the contingencies. (Of course, someone will prove me wrong, but I think it looks good.)
There are several caveats, however:
Second, you must make sure that the jsMath filter runs before the tex filter (i.e., above it in the filter list). This is so that the tex filter can tell that jsMath is active.
Third, you should set the "processTEXtags" flag to 0 in the jsmath/filter.php file so that it won't translate the tex tags itself. (We want the tex filter to do that since it is the one that is setting things up to work with both filters.)
I have attached a copy of the replacement for the tex/filter.php file that includes the needed changes. They are pretty minimal, and I have marked them with "DPVC" comments.
Hope this works for you.
P.S., I have not tested this on MSIE on the PC, as I don't have access to that over the weekend. But it should work. (Famous last words.)