FooBarrington,

I don’t agree completely - there are a lot of things that are possible without JavaScript, which are improved either due to better UX or improved safety through JS.

Easy examples for better UX is anything to do with forms and multi-step processes. Getting validation errors while typing is massively better than getting them on submit, and it’s easy to store temporary edit states locally to prevent data re-entry. This especially goes for offline-first applications.

IMO more importantly, local JS is always preferable to server-side logic when possible, since it means your data never leaves your browser. Imagine a JSON formatter that processes data server-side - you can never be sure what they are doing with your data! Compared to that local JS is incredibly portable (every platform has a browser) and isn’t reliant on anything else. I build my utility apps both in the usual bundler way, and as single files - meaning I can offer my app as a single HTML file you can download and use however you want.

Of course the security benefits aren’t perfect - it’s always possible data is still sent somewhere. I really hope that one day we’ll get an API that allows a website to limit further network connections to specific URLs. This would give users of such applications real peace of mind.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • memes@lemmy.ml
  • localhost
  • All magazines
  • Loading…
    Loading the web debug toolbar…
    Attempt #