🎁 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

Web Caching Strategies
Techniques for storing copies of web resources at various levels to reduce server load, bandwidth, and response times.
DOM (Document Object Model)
A programming interface for HTML documents that represents the page structure as a tree of objects that can be manipulated with JavaScript.
HTTP/2
The second major version of HTTP that improves performance through multiplexing, header compression, and server push.
GraphQL
A query language for APIs that lets clients request exactly the data they need, reducing over-fetching and under-fetching.
Web Accessibility (a11y)
The practice of designing websites that can be used by people with disabilities, following WCAG guidelines.
Responsive Design
A web design approach that makes web pages render well on all screen sizes using flexible layouts and media queries.
View All Web Development Terms →