Explain the function of "Content-type: text/html." What will happen if this line is missing?
remon
2009-09-13 22:06:01 UTC
Explain the function of "Content-type: text/html." What will happen if this line is missing?
Three answers:
anonymous
2009-09-13 22:09:55 UTC
You cant able to see the output ..
the page will be blank while you are running it
▐▀▀♦▀▀▌ ♦Oprah♦ ▐▄▄♦▄▄▌
2009-09-13 22:13:48 UTC
It tells the browser that this page consists of text or html (as opposed to an image, a video, or a music file)
If this line is missing, most browsers will assume that the page is an html page and display it correctly. However some (older) browsers might open a "Save File As" dialog box instead of displaying the page.
?
2009-09-13 22:13:01 UTC
This is a HTTP response to a request and sets the mime type for decoding.
You browser needs to know if it is decoding a picture, programing code, HTML, picture etc..... so the data following the Content directive will be formatted into the respective code.
ⓘ
This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.