I am completely confused now about how to use tikz with tex4ht, since there seems to be some latest changes and not able to figure what is the way to make it work.
Here is a MWE, which I'd like to compile with make4ht in mathjax mode. But the output does not look correct compared to the PDF
\documentclass[11pt]{article}
\usepackage{tikz}
\usepackage{amsmath}
\begin{document}
\begin{tikzpicture}
\coordinate[label =above:$0$, label =below:{$u=0$}] (A) at (0,0);
\coordinate[label =above:$\pi$, label =below:{$u_x=0$}] (B) at (4,0);
\draw (A) -- node[above] {$u_t = k u_{xx} $} node[below] {$f(x)$} ++ (B);
\node at (A)[circle,fill,inner sep=1pt]{};
\node at (B)[circle,fill,inner sep=1pt]{};
\end{tikzpicture}
\end{document}
Now lualatex produces this

And make4ht foo.tex "mathjax" or make4ht foo.tex produces this

The math does not look as good as the PDF. And if I do this make4ht -ulm foo.tex "mathjax" it produces this

Changing the MWE to have this
\documentclass[11pt]{article}
\usepackage{tikz,graphicx,tikz-dependency}
\def\pgfsysdriver{pgfsys-tex4ht.def}
\usepackage{amsmath}
\begin{document}
%as before
\end{document}
Produces same output which is

ALso adding
\ifdefined\HCode
\def\pgfsysdriver{pgfsys-tex4ht.def}
\fi
Had no effect.
I looked at using-htlatex-with-tikz-dependency but answers given are way too complicated and could not follow it. It needs external tools to make them work. inkscape and so on. Which I do not want to use.
What is the simplest way to make tikz work with make4ht these days? I am using TL 2018.
Will things change in TL 2019 for tex4ht?

tex4htdriver at the moment. See https://github.com/pgf-tikz/pgf/issues/651. Thedvisvgm4ht(used in the answer below) is not without problems either and I gather is slower. – David Purton May 02 '19 at 10:12\includegraphicsto load the output pdf image with tex4ht. – Nasser May 02 '19 at 10:17dvisvgm4htdriver definitely does a better job. I think it's still a work in progress though. – David Purton May 02 '19 at 10:19dvisvgm4htworks in most cases, I don't recall any open issues. but maybe I just forgot about something. The compilation time can be saved using thedvisvgm_hashesextension formake4ht. It compiles only changed images and support multiple CPU cores. – michal.h21 May 02 '19 at 11:19dvipsdefinitions anddvisvgmfor the image production, thetex4htpart just marks part of the image that should be converted to an image – michal.h21 May 02 '19 at 13:49