Reply to Re: very basic question about xhtml

Your name:

Reply:


Posted by Mark Parnell on 01/25/06 07:39

Deciding to do something for the good of humanity, John Salerno
<johnjsal@NOSPAMgmail.com> declared in alt.html:
> Mark Parnell wrote:
>> It's configured on the server. Depending on what brand of web server it
>> is, and how much your host allows you to do, you may be able to do it
>> yourself. But for the most part it's up to the host.

Forgot to mention: If you are generating the pages via a server-side
script you can set the HTTP headers in your script (e.g. PHP's header()
function).

> Forgive the constant questions: And how does the server determine how to
> serve it?

Generally it's by file extension.

> Does it read the DTD and then pick the best type, if
> available?

The server doesn't actually look at the contents of the file. And this
goes for *any* file served from a web server, not just web pages.
Images, PDF files, executables, zip files...they all have their own mime
type.

> Or does it perhaps default to HTML unless you specify
> otherwise somehow?

If it's an unknown file type, most servers will default to text/plain.

Incidentally, despite all the above a certain OS component that
masquerades as a browser may try and second guess the type of the file,
regardless of what the server says it is.

--
Mark Parnell
=====================================================
Att. Google Groups users - this is your last warning:
http://www.safalra.com/special/googlegroupsreply/

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация