10
submitted 3 weeks ago* (last edited 3 weeks ago) by TheViking@nord.pub to c/askbeehaw@beehaw.org

[ SERIOUS ]

you are viewing a single comment's thread
view the rest of the comments
[-] Dookieman12@piefed.social 2 points 4 days ago* (last edited 4 days ago)

Cloud engineer here. I'm going to do my best to provide an adequate explanation without getting bogged down in technical details. As such, some of the following may be simplified or missing details for brevity.

Short answer: Yes.

Medium answer: You CAN, but the better question is, "what would the tradeoff be?"

Long answer: JavaScript was born from a need to have page changes occur client-side. This has some benefits. The main ones are client-side control of page rendering (helps with accessibility), server-side performance, and asynchronous page changes.

The benefit to client-side rendering is that the site host only needs to worry about the content of their site; how it appears to the user is controlled by the user. So, if a user needs high-contrast colors, they can do that on their own; they don't need to rely on the host to program that functionality.

Next, performance. If no page updates can occur client-side, they must occur server-side, which demands much higher performance from the hosting server. Rendering a page requires a lot more compute than simply transmitting the HTML code and letting the browser figure it out.

Finally, possibly the biggest benefit to JS is the ability to perform asynchronous updates to the page you're viewing. This is when the browser communicates with the server and updates the page without refreshing the page.

So, depending on the use case, it can be done. For simple, static sites with low traffic and adequate server performance, it's fine to do. But, the more sophisticated you want the site to be, depending on exactly what you want to do, it may not possible. I don't think an online store or secure web portal would be possible, for example.

this post was submitted on 11 Jun 2026
10 points (100.0% liked)

AskBeehaw

2991 readers
6 users here now

An open-ended community for asking and answering various questions! Permissive of asks, AMAs, and OOTLs (out-of-the-loop) alike.

In the absence of flairs, questions requesting more thought-out answers can be marked by putting [SERIOUS] in the title.


Subcommunity of Chat


This community's icon was made by Aaron Schneider, under the CC-BY-NC-SA 4.0 license.

founded 3 years ago
MODERATORS