🎁 New User? Get 20% off your first purchase with code NEWUSER20 Register Now →
Menu

Categories

Web Development Intermediate

What is Middleware?

Software that sits between the request and response in a web application, performing processing like authentication or logging.

Middleware functions form a pipeline that processes HTTP requests and responses. Each middleware can inspect, modify, or reject requests before passing them to the next handler. Common middleware handles authentication, CORS, compression, rate limiting, and logging.

In Express.js, middleware uses next() to pass control. In Laravel, middleware classes handle the request pipeline. The order of middleware execution matters — authentication should run before authorization, for example.

Related Terms

Server-Sent Events (SSE)
A web technology enabling servers to push real-time updates to browsers over a single HTTP connection, simpler than WebSockets.
HTTP/2
The second major version of HTTP that improves performance through multiplexing, header compression, and server push.
API Rate Limiting
A strategy for limiting the number of API requests a client can make within a specified time window to protect server resources.
Cookie
A small piece of data stored in the browser by a website to remember user preferences, login state, or tracking information.
HTTP/3
The latest HTTP version that uses QUIC instead of TCP, providing faster connections and better performance on unreliable networks.
Web Vitals
Google's metrics for measuring user experience quality, including loading speed, interactivity, and visual stability of web pages.
View All Web Development Terms →