How to Extract an Error Object from a Blob API Response in JavaScript

I encountered an issue when I made a GET request in my React project which was supposed to return a file I could download. For the file to download properly, I had to make the response type a blob. But if an error occurred when the server returns a JSON object, I’d be unable to get… Continue reading How to Extract an Error Object from a Blob API Response in JavaScript

How to Compare Two Dates in JavaScript – Techniques, Methods, and Best Practices

In JavaScript, you can use the date object to work effectively with dates, times, and time zones within an application. Date objects help you efficiently manipulate data, handle various date-related tasks, and perform some calculations when creating real-world applications. In this article, we will learn about the following topics: Overview of Date Comparison Importance of… Continue reading How to Compare Two Dates in JavaScript – Techniques, Methods, and Best Practices

Everything about Data Fetching & the JavaScript Fetch API

The lifeblood of modern web applications is data. They rely on fetching information from various sources to deliver dynamic and interactive experiences. This is where the JavaScript Fetch API comes in – a powerful tool that simplifies how you retrieve data across networks. Making a fetch request. Fetch is a promise based api. To make a fetch request, use… Continue reading Everything about Data Fetching & the JavaScript Fetch API

What is the JavaScript Internationalization API (I18n)

English is the world’s most widely used language, yet only one in seven people speak it. It’s the first (native) language of 379 million people, but 917 million speak Mandarin Chinese, 460 million speak Spanish, and 341 million speak Hindi. Many non-English speakers reside in emerging markets with exponential internet growth. If your web app… Continue reading What is the JavaScript Internationalization API (I18n)

Using web workers for safe, concurrent JavaScript

Web workers provide a way to run JavaScript code outside the single thread of execution in the browser. The single thread handles requests to display content as well as user interactions via keyboard, mouse clicks, and other devices, and also responses to AJAX requests. Event handling and AJAX requests are asynchronous and can be considered… Continue reading Using web workers for safe, concurrent JavaScript

Securing Node.js in Production: Expert Practices for Every Developer

As web development keeps evolving, ensuring the security of your Node.js application becomes critical. This detailed guide steps beyond elementary suggestions, offering a closer look at advanced security techniques for Node.js setups. 1. Operating Without Root Privileges: A Must-Do Running Node.js or any web server as a root user poses a significant security risk. A… Continue reading Securing Node.js in Production: Expert Practices for Every Developer

Polymorphism in Javascript

Summary: Polymorphism is a fundamental concept in object-oriented programming (OOP) languages, where “poly” refers to many and “morph” signifies transforming one form into another. In the context of programming, polymorphism enables the same function to be called with different signatures, allowing for flexibility and adaptability in code design. Understanding Polymorphism: In real-life scenarios, individuals often… Continue reading Polymorphism in Javascript

Build a Caching Layer in Node.js With Redis

Your Node.js backend is slow? Speed it up by caching responses and start returning them immediately. This will also drastically increase the number of users who can simultaneously access your site. The problem is that the basic approach to caching in Node.js involves spreading read and write caching operations across the business logic. This leads… Continue reading Build a Caching Layer in Node.js With Redis

Best Practices for Securing Node.js Applications in Production

Node.js is one of the favorite technologies for developers when it comes to backend development. Its popularity keeps rising and is now one of the main targets of online attacks. That is why it is crucial to secure Node.js from vulnerabilities and threats. In this guide, you will see the 15 best practices for devising… Continue reading Best Practices for Securing Node.js Applications in Production