๐ŸŽ New User? Get 20% off your first purchase with code NEWUSER20 ยท โšก Instant download ยท ๐Ÿ”’ Secure checkout Register Now โ†’
Menu

Categories

Web Development Intermediate

What is CORS Preflight?

An automatic OPTIONS request sent by browsers before certain cross-origin requests to check if the actual request is permitted.

Browsers send preflight (OPTIONS) requests for cross-origin requests that use non-simple methods (PUT, DELETE), custom headers, or non-standard content types. The server must respond with appropriate CORS headers permitting the actual request.

Preflight responses are cached (Access-Control-Max-Age) to avoid repeated OPTIONS requests. Missing or incorrect preflight responses are a common cause of CORS errors during development.

Related Terms

Service Worker
A JavaScript file that runs in the background, enabling offline support, push notifications, and background sync for web apps.
TypeScript
A typed superset of JavaScript that adds static type checking, interfaces, and advanced IDE support to JavaScript development.
Static Site Generator (SSG)
A tool that generates a complete static HTML website from templates and content at build time, requiring no server-side processing.
SSR (Server-Side Rendering)
A technique where web pages are rendered on the server and sent as complete HTML to the browser, improving SEO and initial load time.
PHP
A widely-used server-side scripting language designed for web development that powers over 75% of websites including WordPress.
WebSocket
A communication protocol that enables full-duplex, real-time data exchange between a browser and server over a single connection.
View All Web Development Terms โ†’