Re: What's the real content type of XHTML?



David Dorward wrote:
John Salerno wrote:

I probably should have picked up on this by now, but what are "HTTP
headers"? Is that something in the HTML file itself, or is it how the
page is being served (i.e. not easily editable)?

The browser makes an HTTP Request to an HTTP server which sends an HTTP
Response. This response consists of a number of headers followed by the
message body. When requesting HTML documents, the message body consists of
the (entire) HTML document.

It is generally pretty easy to adjust the headers sent providing you have a
reasonable hosting package.

That said, XHTML as text/html is silly and XHTML as application/xhtml+xml is
badly supported (e.g. IE doesn't try to render it at all. Firefox can't
deal with it as well as text/html.)

Sticking with HTML 4.01 Strict on the client side is still the best choice
in almost every case.


That's what I suspected. The other day I set up application/xhtml+xml on my server, so that would be the HTTP Header when an .xhtml file is sent back?
.



Relevant Pages

  • Re: How could this possibly happen (HttpURLConnection + simple JSP page)
    ... In PHP that would throw some nasty HTTP-related warnings and potentially break the page as you are changing the headers after HTML display? ... You are writing code in a special format that is compiled in to a servlet, which is then executed by the server when the page is requested. ... The other thing is that writing things "after HTML display" is probably very difficult as the display is done on the users computer when they have recieved the response. ... When you create a response for the user it does not necessarily get sent back as soon as you start, and more importantly the headers do not necessarily finish as soon as you start writing to the body. ...
    (comp.lang.java.help)
  • Re: Help getting into HTML file.
    ... How can I get it into an .html file so I can see it on my ... Do you want to print the response to your browser? ... Do you want to save the result to a new HTML file on your local computer? ... be printing the response. ...
    (comp.lang.perl.misc)
  • Re: Igor, pAPP toolkit questions
    ... Thanks for your response. ... Your toolkit has just been invaluable and I ... > headers have been fully prepared. ... you suggesting I add a datastructure there to maintain the HTML info ...
    (microsoft.public.inetsdk.programming.webbrowser_ctl)
  • Re: Need help to figure out urllib2.Request()
    ... I tried to open some web pages with urllib2.Request(url, data, headers), but ... data= account ... response = urllib2.urlopen ... html = response.read ...
    (comp.lang.python)
  • Re: Recursively scraping web pages for embedded links and files
    ... Tim- thank you again for your response. ... I've managed to get the HTML of a target page ... If you're new to working with HTML docs from Excel then it may be a long ... scrape multiple levels within the directory tree of a website. ...
    (microsoft.public.excel.programming)