HTTP Headers Reference
HTTP रिक्वेस्ट और रिस्पॉन्स हेडर्स का पूरा संदर्भ
33 headers
Media types the client can process (e.g. application/json, text/html).
Accept: text/html,application/xhtml+xmlContent encodings the client supports (gzip, deflate, br).
Accept-Encoding: gzip, deflate, brPreferred natural languages for the response.
Accept-Language: en-US,en;q=0.9Credentials for HTTP authentication.
Authorization: Bearer eyJhbGc...Directives for caching mechanisms in both requests and responses.
Cache-Control: no-cache, no-storeControl options for the current connection.
Connection: keep-aliveSize of the request/response body in bytes.
Content-Length: 348Media type of the request/response body.
Content-Type: application/json; charset=utf-8HTTP cookies previously sent by the server.
Cookie: session=abc123; user=johnDomain name and port of the server. Required in HTTP/1.1.
Host: www.example.com:443Makes the request conditional; returns 304 if not modified.
If-Modified-Since: Mon, 18 Jul 2016 02:36:04 GMTMakes request conditional using ETags.
If-None-Match: "737060cd8c284d8af7ad3082f209582d"The origin that initiated the request (for CORS).
Origin: https://developer.example.comAddress of the previous web page that linked to the current page.
Referer: https://developer.example.com/pageApplication, OS, vendor, and version of the requesting client.
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64)Indicates whether the response can be shared with code from the given origin.
Access-Control-Allow-Origin: *HTTP methods allowed when accessing the resource for CORS.
Access-Control-Allow-Methods: GET, POST, PUTHeaders that can be used during the actual CORS request.
Access-Control-Allow-Headers: Content-Type, AuthorizationEncoding applied to the response body (gzip, br, etc.).
Content-Encoding: gzipControls resources the user agent is allowed to load.
Content-Security-Policy: default-src 'self'Identifier for a specific version of a resource (for caching).
ETag: "33a64df551425fcc55e4d42a148795d9f25f89d4"Date/time after which the response is considered stale.
Expires: Thu, 01 Dec 2025 16:00:00 GMTDate/time when the resource was last modified.
Last-Modified: Wed, 21 Oct 2015 07:28:00 GMTURL to redirect to for 3xx responses or the URL of the newly created resource.
Location: /new-pageHow long to wait before making another request (rate limiting/503).
Retry-After: 120Send a cookie from the server to the user agent.
Set-Cookie: id=a3fWa; Expires=Thu, 21 Oct 2025 07:28:00 GMT; Secure; HttpOnlyForce HTTPS for all future connections (HSTS).
Strict-Transport-Security: max-age=31536000; includeSubDomainsForm of encoding used to safely transfer the payload body.
Transfer-Encoding: chunkedDetermines which request headers to use for cache key.
Vary: Accept-Encoding, Accept-LanguageAuthentication method to access the resource (sent with 401).
WWW-Authenticate: Basic realm="Access to staging site"Prevent MIME type sniffing.
X-Content-Type-Options: nosniffIndicate whether the response can be framed (clickjacking protection).
X-Frame-Options: DENYEnable XSS filtering in older browsers (deprecated, use CSP instead).
X-XSS-Protection: 1; mode=blockइस टूल के बारे में
HTTP Headers Reference सबसे अधिक इस्तेमाल होने वाले request और response headers को सरल भाषा में विवरण और उदाहरण मानों के साथ कवर करता है। सुरक्षा की दृष्टि से महत्वपूर्ण headers को लाल रंग में हाइलाइट किया गया है।
आवश्यक जानकारी जल्दी पाने के लिए category (Request, Response, या Both) के अनुसार फ़िल्टर करें या header नाम व keyword से खोजें।
कैसे उपयोग करें
- सूची को तुरंत फ़िल्टर करने के लिए सर्च बॉक्स में header नाम या keyword टाइप करें।
- केवल Request, Response, या Both headers दिखाने के लिए category ड्रॉपडाउन का उपयोग करें।
- प्रत्येक एंट्री में header नाम, category बैज, विवरण और एक उदाहरण मान दिखाया जाता है।
- अपने सर्वर या HTTP क्लाइंट को कॉन्फ़िगर करते समय उदाहरण मानों को शुरुआती बिंदु के रूप में उपयोग करें।
उपयोग के मामले
बैक-एंड इंजीनियर डिप्लॉयमेंट से पहले सही सुरक्षा headers (CSP, HSTS, X-Frame-Options) सेट करते हैं। फ्रंट-एंड डेवलपर Access-Control headers का उपयोग करके CORS समस्याओं को डिबग करते हैं। HTTP सीख रहे छात्र प्रोटोकॉल के काम करने के तरीके को समझने के लिए इस reference का उपयोग करते हैं।
अक्सर पूछे जाने वाले प्रश्न
- Request और response headers में क्या अंतर है? — Request headers क्लाइंट द्वारा संदर्भ प्रदान करने के लिए भेजे जाते हैं (accepted types, authentication)। Response headers सर्वर द्वारा response के बारे में मेटाडेटा के साथ भेजे जाते हैं (content type, caching, security)।
- सुरक्षा के लिए हर साइट को कौन से headers जोड़ने चाहिए? — कम से कम: सभी responses पर Strict-Transport-Security, Content-Security-Policy, X-Content-Type-Options, और X-Frame-Options होने चाहिए।
- क्या यहाँ सभी HTTP headers सूचीबद्ध हैं? — नहीं। यह reference सबसे अधिक इस्तेमाल होने वाले मानक और सुरक्षा headers पर केंद्रित है। पूरी सूची के लिए MDN की HTTP headers डॉक्यूमेंटेशन देखें।