Computer

JavaScript: the Web could do without it according to the organizers of JS Naked Day

JavaScript: the Web could do without it according to the organizers of JS Naked Day

A principle promoted by World Wide Web Consortium (W3C), an international organization that develops standards for the World Wide Web, is the so-called “Rule of Least Power“. It states that when developing technologies for the Web, preference should be given to the least powerful language or technology that is capable of achieving the desired objective. In other words, the simplest and most limited technology that is still capable of performing the required task effectively should be used. JavaScript is a programming language widely used to create dynamic and interactive web pages.

What is JavaScript, in a nutshell

It was 1995 when Brendan Eich (Netscape Communications) thought Mocha and subsequently, LiveScript. It’s about languages which preceded the arrival of JavaScript and which in fact formed its foundations.

JavaScript is an interpreted language: the source code is obvious and is integrated into the vast majority of Web pages that we visit every day. One of the “strengths” of JavaScript is the possibility of manipulate the DOM (Document Object Model) or to allow the modification of the structure of the pages in a rather simple way.

Developers can thus modify, add or remove HTML and CSS elements based on user interaction or other events. Interactivity e event management are the other two pillars underlying the functioning of JavaScript, a language that allows you to easily add elements such as contact forms, scrollable image galleries, dynamic drop-down menus and much more as well as monitor events such as mouse clicks, key presses and loading of the page.

JavaScript code is also widely used for communication con i server in a way asynchronous, having to reload the entire page. This is often done using XMLHttpRequest (XHR) o l’API Fetch to send and receive JSON or XML data.

It is possible to do without JavaScript: the JS Naked Day initiative starts

Despite the importance of JavaScript to many key features of modern web pages, it is possible to create pages using it alone HTML e CSS. The common opinion is that the use of JavaScript is now indispensable and that without its support by browsers, theuser experience would be severely penalized.

Yet, also out of provocation given the slightly too “intrusive” use that some developers now make of JavaScript, also through the multiple framework available, the organizers of JS Naked Day they try to make their voice heard.

On April 24th we want to celebrate the JS Naked Dayan annual celebration that promotes the idea of ​​a Web that can be used even without resorting to JavaScript, embracing precisely the “Rule of Least Power” described at the beginning. According to the organizers, HTML and CSS are sufficient for all basic functionality and the adoption of JavaScript should be limited to the bare minimum.

Because JS Naked Day is celebrated on April 24th

In some countries, “April 24” may be written as “4/24,” which coincides with the HTTP error code released in case of failed dependency. JS Naked Day promotes the concept that websites should function without dependencies on JavaScript.

To check how a Web without JavaScript, normal users are advised to temporarily disable JavaScript support in their browser. With Google Chromefor example, you can do it by typing chrome://settings/content/javascript in the address bar then selecting the option Don’t allow sites to use JavaScript. The intervention is applied immediately: there is no need to restart the browser. If necessary, also try using incognito mode.

The same change is applicable in Edgetyping edge://settings/content/javascript and then turning off the option Allowed.

The promoters of the initiative also suggest sending a notification to the administrators of all those websites that do not work without enabling the JavaScript support.

Leave a Reply

Your email address will not be published. Required fields are marked *