4 ms·
May I ask how to create a Mathematics Stack Exchange clone without JS?
by The_suffocated 5y ago
May I ask how to create a Mathematics Stack Exchange clone without JS?
- adabaed 5y agoPHP and cocaine.
- jhgb 5y agoWhat part of a Mathematics Stack Exchange clone would require JS?
- tazjin 5y agoIn "modern" stacks it is preferable to do things like layouting of formulas millions of times on the clients, instead of once on the server. I guess that sort of thing needs JS.
- southerntofu 5y agoAs you have pointed out, but formulated more explicitly: client-side rendering should deal only with HTML/CSS because that's what the browser is built and optimized for. Every line of script changing the DOM (html structure) may trigger a redraw of the page, which means wasting considerable amount of resources! But even if your script outputs HTML only once, you still have O(n) HTML templating instead of O(1) for n clients. Such a waste!
- The_suffocated 5y agoThe MathJax part.
- jhgb 5y agoMathJax is somewhat convenient but doesn't seem necessary at all.
- est 5y agoIn the past Latex symbols were rendered on server as an image. It was not pretty but it works virtually anywhere.