๐ŸŽ New User? Get 20% off your first purchase with code NEWUSER20 ยท โšก Instant download ยท ๐Ÿ”’ Secure checkout 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

gRPC
A high-performance RPC framework using Protocol Buffers and HTTP/2 for efficient service-to-service communication.
Canonical URL
An HTML element that tells search engines which URL is the preferred version of a page when duplicate or similar content exists at multiple URLs.
Brotli Compression
A modern compression algorithm developed by Google that achieves better compression ratios than Gzip for web content delivery.
HATEOAS
Hypermedia As The Engine Of Application State โ€” a REST constraint where API responses include links to related actions and resources.
Cookie
A small piece of data stored in the browser by a website to remember user preferences, login state, or tracking information.
SPA (Single Page Application)
A web application that loads a single HTML page and dynamically updates content without full page reloads.
View All Web Development Terms โ†’