Web Development Articles

Page 140 of 801

Implementing GraphQL Subscriptions for Real-Time Data Updates in JavaScript

Mukul Latiyan
Mukul Latiyan
Updated on 15-Mar-2026 278 Views

In today's fast-paced world, real-time data updates are becoming increasingly crucial for modern web applications. One popular solution for achieving real-time functionality is GraphQL subscriptions. In this article, we will explore how to implement GraphQL subscriptions in JavaScript, providing code examples, explanations, and a comprehensive understanding of the topic. Understanding GraphQL Subscriptions GraphQL is an open-source query language for APIs and a runtime for executing these queries with existing data. It allows clients to request specific data from the server, enabling efficient and flexible communication between the client and the server. While GraphQL queries and mutations are used ...

Read More

Implementing Real-Time Collaboration in JavaScript Applications

Mukul Latiyan
Mukul Latiyan
Updated on 15-Mar-2026 761 Views

Real-time collaboration has become an essential feature in modern web applications. It allows multiple users to work together simultaneously, making it easier to collaborate and communicate in real-time. JavaScript, being the dominant language for web development, provides a variety of tools and frameworks to implement real-time collaboration seamlessly. In this article, we will explore different techniques and technologies to implement real-time collaboration in JavaScript applications. WebSockets WebSockets provide a bi-directional communication channel between a client and a server, enabling real-time data transfer. It allows the server to push updates to connected clients instantly, eliminating the need for continuous ...

Read More

JavaScript Memory Profiling and Performance Optimization

Mukul Latiyan
Mukul Latiyan
Updated on 15-Mar-2026 844 Views

JavaScript is a popular programming language used for creating dynamic web pages and applications. However, as applications become more complex, memory usage and performance can become critical factors. In this article, we will explore memory profiling and performance optimization techniques in JavaScript to help you build efficient and fast-running applications. Memory Profiling Memory profiling involves analyzing the memory usage of your JavaScript application to identify and resolve memory leaks and excessive memory consumption. Let's look at examples of memory profiling using different tools and techniques. Memory Profiling with Chrome DevTools function createArray(size) { ...

Read More

JavaScript Testing Techniques: Integration Testing, E2E Testing, and Mocking

Mukul Latiyan
Mukul Latiyan
Updated on 15-Mar-2026 380 Views

Testing plays a crucial role in ensuring the quality and reliability of JavaScript applications. While unit testing is widely adopted, advanced testing techniques such as integration testing, end-to-end (E2E) testing, and mocking are equally important in delivering robust applications. In this article, we will explore these advanced JavaScript testing techniques, providing theoretical explanations, code examples, and their benefits. Integration Testing Integration testing focuses on verifying the interactions and dependencies between different components of an application. It ensures that individual units work together harmoniously. JavaScript frameworks like Jest, Mocha, and Jasmine provide excellent support for integration testing. Example: ...

Read More

Optimising JavaScript Bundle Sizes: Strategies for Code Splitting and Lazy Loading

Mukul Latiyan
Mukul Latiyan
Updated on 15-Mar-2026 323 Views

In today's digital landscape, web applications have become increasingly sophisticated, offering a wide range of features and functionalities to users. However, this evolution comes at a cost: larger JavaScript bundle sizes. When a user visits a website, the browser is responsible for downloading and executing the entire JavaScript bundle, which can be a time-consuming process. This results in slower load times, increased network usage, and, ultimately, a negative impact on the user experience. To address this challenge, developers have turned to various techniques to optimize JavaScript bundle sizes. Two popular strategies that have gained traction are code splitting and ...

Read More

Parallel Programming in JavaScript with Web Workers and SIMD.js

Mukul Latiyan
Mukul Latiyan
Updated on 15-Mar-2026 823 Views

JavaScript traditionally executes tasks in a single-threaded manner, which can limit performance for computationally intensive operations. However, modern web technologies enable parallel programming through Web Workers and SIMD.js, allowing developers to leverage multi-core processors for improved efficiency. Understanding Parallel Programming Parallel programming involves dividing tasks into smaller subtasks that execute concurrently, utilizing multiple resources to improve performance. In JavaScript, this is particularly beneficial for complex computations, data processing, and simulations without blocking the main UI thread. Web Workers Web Workers enable JavaScript code execution in separate background threads, providing true parallel processing. They operate independently from ...

Read More

How to prevent overriding using Immediately Invoked Function Expression in JavaScript?

Mohit Panchasara
Mohit Panchasara
Updated on 15-Mar-2026 516 Views

JavaScript allows developers to add functionality and behaviors to the web page. Developers require to create multiple functions and variables to add functionality to different parts of the web page. While developing real-time applications, multiple developers work on the same project. So, avoiding the unintentional overriding of functions and variables while collaborating with multiple developers is necessary. In this tutorial, we will learn to prevent overriding using immediately invoked function expressions. Problem of Overriding For example, two colleagues are working on the same project, and both have defined the printAge() function inside the code and merged the ...

Read More

How to record and play audio in JavaScript?

Mohit Panchasara
Mohit Panchasara
Updated on 15-Mar-2026 6K+ Views

Are you also willing to add a custom audio recording feature to your web application? If yes, you are in the right place, as we will learn to record and play audio using JavaScript in this tutorial. Some applications like Discord allow you to record the audio and store it inside that to play it anytime. The recorded audio can also be used as a meme for fun, alerts in the discord meetings, etc. We can also use the MediaRecorder API of JavaScript to add the recording audio feature to our web application. Here, we will learn a ...

Read More

How to disable button element dynamically using JavaScript?

Dishebh Bhayana
Dishebh Bhayana
Updated on 15-Mar-2026 3K+ Views

In this article, we will learn how to disable button HTML elements dynamically using JavaScript, with the help of the "disabled" attribute. The "disabled" attribute in HTML button elements accepts a boolean value (true or false), and depending on the value, it disables the button and makes it non-functional, i.e., not clickable. We can use this attribute to disable any button in HTML by setting the "disabled" attribute to "true". Syntax Disabled Button In JavaScript, you can disable a button dynamically by setting the disabled property: // Disable button button.disabled = true; ...

Read More

How to display a warning before leaving the web page with unsaved changes using JavaScript?

Dishebh Bhayana
Dishebh Bhayana
Updated on 15-Mar-2026 3K+ Views

In this article, we will learn how to display a warning message before leaving the web page with unsaved changes using JavaScript with the help of the "beforeunload" event listener. When working on web applications or forms of any kind, it becomes necessary to provide a warning message to users before they leave a page with unsaved changes. This can prevent accidental data loss and improve the overall user experience. Let's understand how we can implement this with the help of some examples − Using beforeunload Event In this example, we will have a form with multiple ...

Read More
Showing 1391–1400 of 8,010 articles
« Prev 1 138 139 140 141 142 801 Next »
Advertisements