if you're a client using a Torbrowser, it's recommended to disable JavaScript.
But if you're a server providing a service - how to disable JavaScript?
TIA
Tor Stack Exchange is a question and answer site for researchers, developers, and users of Tor. It only takes a minute to sign up.
Sign up to join this communityI'm not sure what exactly you mean here; but if you're trying to run a onion service you don't have to deal with JavaScript at all if you don't want to. Just don't include any JavaScript code on the webpages/services you plan to offer via the onion service.
If you meant how you can disable all web servers from delivering JavaScript to the websites you visit, that is not possible. In that case, you'll have to disable JavaScript on the Tor Browser. You can do so by changing the Security Settings ('Safer' to disable JS for non-https sites and 'Safest' to completely disable JS). Hope that answers your question!