Use MathJax to render your formulas. MathJax is a full fledged open source JavaScript display engine for mathematics and works in all browsers.

This is the recommended approach!

Get started by loading the default AsciiMath configuration:

<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.4/latest.js?config=AM_CHTML"></script>

Visit the MathJax Getting Started page to find other CDN options , or to learn how to install MathJax locally on your server.