Hi
I recently implemented PageSpeed Service (which serves content via Google's CDN servers).
PageSpeed has options for optimising HTML (I'm using "Collapse whitespace") and javascript ("combine javascript" and "minify javascript").
Most of my pages came through unscathed (and they certainly load faster).
Two pages that did not fare so well involve the Hub.Queue with the following line:
MathJax.Hub.Queue(function () {Message("*** MathJax is done! ***")});
and the function:
window.Message = function (message) {
***
}
I'm getting "Uncaught ReferenceError: Message is not defined" and MathJax fails to process the page.
I have tried:
(1) Turning on and off all the "optimize HTML" and "optimize javascript" options in PageSpeed - no joy
(2) Simplifying the definition of window.Message.
Here are the pages without rewriting by Google (they work fine - because I blacklisted them from Google's processes):
And here are the optimized pages that give the error:
I suspect it is a timing issue. I have moved MathJax, jQuery and my own script to different parts of the page, but it doesn't make a difference.
Any suggestions on how to address this would be appreciated.
BTW, PageSpeed Service solved another issue I was about to raise on this forum. Before, it was very common for an Adsense resource to block a MathJax download (or vice-versa), freezing the page for many seconds. But Google seems to do a good job of separating out the two so there is no conflict.
Regards
Murray