# Math in front matter results in cookies

I noticed what to me seems like a very strange behaviour. When I set math to true in my toml front matter of a blog post (so that I would be able to use LaTeX), it results in .fontawesome.com cookies being added to the page:

Even though I use Font Awesome all over my website, these cookies only appear when I include math in my front matter.

Is there a way to somehow disable these cookies? I tried doing that in nginx, but that did not work. If you do know how to delete them (in Hugo or nginx), I would really appreciate the help.

Do not know if it is important, but I use Hugo Coder theme and the following lines are added when I enable math:

<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script type="text/javascript" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
<script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/startup.js" id="MathJax-script"></script>
<script>
MathJax = {
tex: {
inlineMath: [
['$', '$'], ['\$$', '\$$']
],
processEscapes: true,
processEnvironments: true
},
options: {
skipHtmlTags: ['script', 'noscript', 'style', 'textarea', 'pre']
}
};
</script>


That theme uses hosted fontawesome scripts which might be the source of that cookie:

1 Like

I thought that too but even when I download Font Awesome and use that local version, the issue does not go away. As a matter of fact, I can even delete that line from the baseof.html file and the cookies remain.

The problem really seems to arise when math = true, regardless of whether Font Awesome font is loaded or not. I cannot get my head around this…

You may get better answers asking the theme maintainers. They would have a better idea as to what is setting the cookies.

Note that math is not a Hugo page variable, it is specific to the theme you are using.
Alright, I did not know this but apparently Hugo Coder allows to use either math or katex in its front matter. It seems that math enables MathJax, while katex enables… well, KaTeX.
When I use katex, no cookies appear and the math still seems to be displayed correctly, so I will just stick with it.