Troubleshooting MathJax.js Load Error on PF Website

In summary, the web page at PF includes a script that is not loading, resulting in latex not being rendered. When trying to fetch the script with curl, there is an error connecting to cdnjs.cloudflare.com. The conversation discusses whether or not others are experiencing the same issue and how it was resolved by removing the URL from the hosts file.
  • #1
KenJackson
63
10
The web pages at PF include this script, which won't load, so latex is not rendered:
https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.4/MathJax.js

When I try to fetch it with curl, I get an error:
"Failed to connect to cdnjs.cloudfare.com port 443: Connection refused"

Am I the only one? Is latex being rendered for anyone right now? If it is, why can you access the script, but I can't?
 
Physics news on Phys.org
  • #2
The .js is loading fine for me, and Latex is rendering properly.
 
  • #3
Works perfectly here.
 
  • #5
Solved the problem. It was only on my PCs.

Over the years, I've been annoyed by various online ads, some that even seem to get through adblock plus. So I find the offending URL and define it to 127.0.0.1 in /etc/hosts. As it turned out, cdnjs.cloudflare.com must have hosted an annoying ad at some point because I had it in /etc/hosts.

I removed it and now everything is fine.
 
  • Like
Likes Greg Bernhardt and Tom.G

1. What is MathJax.js and why is it important for the PF website?

MathJax.js is a JavaScript library used to display mathematical equations and symbols on web pages. It is important for the PF website because many of the articles and resources on the website contain mathematical content.

2. What does a "load error" for MathJax.js mean?

A "load error" for MathJax.js means that the browser was unable to properly load and execute the necessary code for MathJax.js to function. This can happen for various reasons, such as a slow internet connection or a conflict with other scripts on the website.

3. How can I troubleshoot a MathJax.js load error on the PF website?

First, try refreshing the page to see if the error resolves itself. If not, check your internet connection and make sure it is stable. If the issue persists, try clearing your browser's cache and cookies. You can also try accessing the website using a different browser. If none of these solutions work, it may be a problem with the website itself and you should contact the website administrator for further assistance.

4. Can I disable MathJax.js on the PF website?

Yes, you can disable MathJax.js on the PF website by going into your browser's settings and disabling JavaScript. However, this will also disable other website features that rely on JavaScript, so it is not recommended.

5. Is there a way to prevent MathJax.js load errors from occurring?

To prevent MathJax.js load errors, make sure you have a stable internet connection and try to limit the number of browser extensions or scripts running on the website. If you are using custom code on the website, make sure it is not conflicting with the MathJax.js library. Regularly clearing your browser's cache and cookies can also help prevent load errors.

Similar threads

  • Programming and Computer Science
Replies
11
Views
2K
  • Programming and Computer Science
Replies
13
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
274
  • MATLAB, Maple, Mathematica, LaTeX
Replies
25
Views
3K
  • Computing and Technology
Replies
22
Views
5K
  • General Discussion
Replies
17
Views
5K
  • General Discussion
Replies
2
Views
2K
Back
Top