Attempt to use async + defer to speed up loading of MathJax.
This commit is contained in:
parent
d9c3a561ca
commit
3a29f77dc1
|
@ -59,15 +59,17 @@
|
|||
(collection-file-path "MathJax" "scribble-math")))
|
||||
|#
|
||||
|
||||
(define (load-script-string src)
|
||||
(define (load-script-string src [async-defer #f])
|
||||
(string-append
|
||||
#<<EOJS
|
||||
(function() {
|
||||
document.write('<scr' + 'ipt type="text/javascript" src="
|
||||
EOJS
|
||||
src
|
||||
"\""
|
||||
(if async-defer " async=\"async\" defer=\"defer\" " "")
|
||||
#<<EOJS
|
||||
"></scr' + 'ipt>');
|
||||
></scr' + 'ipt>');
|
||||
})();
|
||||
EOJS
|
||||
))
|
||||
|
|
Loading…
Reference in New Issue
Block a user