- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
What are important HTTP headers to be frequently used in Python CGI Programming?
HTTP Header
The line Content-type:text/html\r\n\r\n is part of HTTP header which is sent to the browser to understand the content. All the HTTP header will be in the following form −
HTTP Field Name − Field Content
For Example
Content-type − text/html\r\n\r\n
There are few other important HTTP headers, which we will use frequently in our CGI Programming.
Sr.No. | Header | Description |
1 | Content-type: | A MIME string defining the format of the file being returned. Example is Content-type:text/html |
2 | Expires: Date | The date the information becomes invalid. It is used by the browser to decide when a page needs to be refreshed. A valid date string is in the format 01 Jan 1998 12:00:00 GMT. |
3 | Location: URL | The URL that is returned instead of the URL requested. You can use this field to redirect a request to any file. |
4 | Last-modified: Date | The date of last modification of the resource. |
5 | Content-length: N | The length, in bytes, of the data being returned. The browser uses this value to report the estimated download time for a file. |
6 | Set-Cookie: String | Set the cookie passed through the string |
- Related Articles
- How to read all HTTP headers in Python CGI script?
- What are important server response headers that are useful in web programming?
- What are environment variables available in Python CGI Programming?
- What are the modules required for CGI programming in Python?
- How to do CGI programming in Python?
- What are some of the important Scientific Libraries used in Lua programming?
- How to setup cookies in Python CGI Programming?
- How to retrieve cookies in Python CGI Programming?
- How to configure Apache for Python CGI Programming?
- How do cookies work in Python CGI Programming?
- Program to implement Least Frequently Used Cache in Python
- What are the headers used in a Data Link Layer?
- What is the difference between GET and POST in Python CGI Programming?
- The best way to inspect HTTP response headers with Selenium
- How to write first Hello World program using CGI programming in Python?

Advertisements