2.2K Followers
·
Follow

Choosing what‘s best for your audience

Image for post
Image for post
Photo by Annie Spratt on Unsplash

Why Lazy Load Images?

Performance is crucial in web applications. You can have the most beautiful and engaging website in the world, but if it does not load quickly on the browser, people would tend to skip it. It can be quite tricky to make your website perform really well. This is because of the numerous bottlenecks present in web development such as expensive JavaScript, slow web font delivery, heavy images, etc.

Let’s focus on how images affect your performance. According to Jecelyn, on average a web page consumes 5 MB of data just for images. This can be a heavy burden on the users as it can be very costly in some countries, especially on mobile data. …


A feature that can change the way we JavaScript

Image for post
Image for post
Photo by Ales Krivec on Unsplash

JavaScript is a very flexible and powerful language that has transformed the web in this modern era. One of the main reasons for JavaScript to be dominant in web development is that it is continuously improved with major updates often.

One such proposal is concerning a new feature called “top-level await”. This particular feature enables ES modules to act as async functions. It allows ES modules to await resources and block other modules who import them. The modules who import an awaiting resource can only evaluate the body after the resources have been settled and are ready.

This proposal is currently in stage 3, therefore you can’t directly use it in production. But it is beneficial for you to learn it as it will soon be rolled out in the near future.


Share resources amongst several tabs/workers without any synchronization issues.

Image for post
Image for post
Image by MasterTux from Pixabay

What are Locks?

As computers have now become more powerful, they use several CPU threads to process data. This brings forth newer problems regarding resource sharing as there can be synchronization issues when multiple threads access a single resource.

If you are familiar with threads, you would be aware of the concept of locks. Locks are a method of synchronization that enforces access restrictions to threads such that multiple threads cannot access a single resource at the same time. …

About

Mahdhi Rezvi

JavaScript Geek 😎 — Tech Writer with 1M+ views 👻 — Undergrad at UoM 🇱🇰 ❤️ — https://thisismahdhi.ml

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store