It's time to ditch Medium for good! 🌈⚡️

Introducing Devblog by Hashnode. Blog on your domain for FREE. Highly customizable and optimized for developers.

Learn more

JS from a user's viewpoint

This is Hashnode, a community for developers. We are here, among other developers, so our view of the world might become a little bit biased. That's why, here's some food for thought, and I want to hear your voices as an answer to these users' comments:

It's 2019. I have little interest in using a website that doesn't fetch without a full page reload. JS is necessary full stop.


I find that sites that rely on JS for updates often end up sucking up too much memory and slowing the browser down, so I rely on explicit full page reloads to clean up the memory footprint.

Source

Write your answer…

5 answers

I think about intentions. needing JS for a news/information page is just stupid and a waste of energy. We invented HTML for this so why adding extra complexity where it does not need to be?

for an application on the other hand where interactivity and data is not indempotent it can help a lot. Although even there the layers should be there so the fallback is the classic request response model.

Speaking from a web-perspective it seams stupid to move away from a robust declarative model to a fragile imperative language.

But well ... in the end we can find arguments to bend the world to our views anyhow. I personally want things to work without JS because I think most JS coders are script kiddies who don't know what they are doing. Hence I don't trust their applications.

Backend people are less dangerous they mainly break their OS not the clients ;D ....

Reply to this…

Share your programming knowledge and learn from the best developers on Hashnode

Get started

I think that being able to load full pages and work without javascript should be the ideal.

I feel it is strictly speaking the better solution, and there's no fundamental technical restrictions preventing it.

That said, I can see that the majority of projects wouldn't see their investment earned back, and so probably won't do it.

Which is fine, there's always a gap between technical ideals and what's affordable.

Reply to this…

I think if the user becomes actively aware of the technology being used, we've failed to create a great experience.

I'd also say both of those quotes are non-typical user quotes. Most people will say they like a page that's fast, hate one that's slow, and really hate one that makes their browser crash. But if they're talking about fetching and memory footprints, they are way more tech savvy and tech-engaged than the average punter.

Reply to this…

Javascript isn't required but it does help your page/website stand out with animations etc. But even those can be done with transforms and SVG's. Then after that its about tracking and functional stuff etc.

I agree that a lot of developers sacrifice the actual impact on the users computer, or at the very least it is not considered as much as it should be.

Having a JS website and a non-JS website would be interesting from a caching and offline perspective though, as well as a preparing the page type deal where you include only the fundamental components/resources first, then introduce the heavier stuff after.

I also feel that relying on explicit full page reloads to clean up the memory footprint is an extremely bad practise. In my opinion is suggests being lazy and expecting stuff to just work. Proper/graceful shutdowns/teardowns are best practise in my opinion. I think the following example illustrates my point quite well;
You're a software engineer and you have had a big day and you're desk is covered in energy drink cans and coffee mugs - a complete mess. Now you can do one of two things; either clean it up, so you know you have a clean environment to work in tomorrow, Or let the cleaners sort it out. BUT there's always a chance that not all the mess gets cleaned up by a 3rd party. Always do what you can yourself.

Reply to this…

I wrote this a few+ years back...

~~~~~~

Javascript - To Support or Not to Support

Contemporary web-development is founded increasingly on the "Web 2.0" vision of rich, interactive media and dynamic interaction with background, server-side technologies. JavaScript provides an invaluable tool to enhance modern web pages and increase the sophistication of website interaction to rival and even surpass that of desktop applications.

The introduction of Ajax (Asynchronous JavaScript And XML) and its ability to provide new content and functionality to a website without the need to refresh the entire page has become the backbone of the "Web 2.0" revolution. So much so that the majority of rich and interactive websites rely on JavaScript and in particular Ajax.

There are very few good motives to disable JavaScript in light of modern browser capacities. Contemporary browsers permit the regulation of JavaScript to address security issues and can be tuned to suit the needs and concerns of any user without disabling JavaScript completely. The growing sophistication of anti-malware solutions coupled with the evolution of browsers allows JavaScript to be enabled safely for the vast majority of users.

Other media, such as Radio, Television and even Print, do not provide 100% coverage of all potential customers, and the same is true of the Internet. Admittedly, these other media do not steal identities and compromise one's computer to nefarious ends. However, most of the dangers of enabling JavaScript in a web browser can be ameliorated or entirely eliminated by relatively simple precautions.

The use of JavaScript is not an accessibility issue that discriminates against users with disabilities, nor does it affect visitors based on any preconceived geographic, social, cultural, or ethnic criteria. There is a small percentage of web users who make a conscious decision to disable JavaScript and as a result do not benefit from this significant advancement in web technology. Those who elect to disable the benefits of JavaScript miss out on a very rich tapestry of modern, dynamic interactions, which dramatically improve the quality of the "online experience."

It is possible to develop websites which maintain parallel content that does not rely on JavaScript; however, there are real costs to maintaining such a system. Server-side management can substitute dynamic behaviour to some extent, but there will be significant degradation of user experience and website performance. Such an approach cannot provide the same benefits or positive user experience as offered when JavaScript is available.

Any entity considering the publication of web pages should determine the degree of its reliance on JavaScript in terms of expected Return On Investment (ROI). Some questions by which to assess potential ROI are:

  • Who constitutes the expected, potential customer base?
  • How likely are potential customers, who surf the web for candidate services in the categories we provide, to be among those who disable JavaScript?
  • What is the probability of a significant opportunity loss for a refusal to provide any/all content to a small fraction of visitors?
  • What is likelihood of a significant, negative impact on our brand for refusing to offer more than minimal support or possibly none to visitors without JavaScript?
  • How much will the parallel development of content cost?
  • What will be the additional costs and risks during development and ongoing support of alternative approaches to presentation?

With the answers to these questions in hand, a rational decision can be reached.

Reply to this…