Page Speed with scripts


#1

Hello!
I own the site over here. I’m using the default theme Casper with my own (smaller) tweaks.

So I was wondering, after having used PageSpeed Insights, with a score of 88 on front page, but around 55-60 on slowest page. How can I speed up scripts running, since they are the ones that tear down performance?

Particularly, I have MathJax and PrismJs, which are the one’s I’m looking to uptimize first.


One thing I’m noticing is the code injection injects into {{ghost_head}}, which is included in default.hbs, which includes post content (from post.hbs) on the site. Particularly, where else can I load css and javascript other than default.hbs? And where can I do the code injection being done in the UI?

Maybe there is a way to only load all of PrismJs (css and javascript) and MathJax (from code injection, javascript only) only on posts on the site and once the page has loaded and can be interacted with?