[WSG] page check please - mime type!
Dear colleagues, Forgive my labouring the point, but after our discussions I have done what Gunlaug did, i.e., made a page as xhtml, with the headers as below: !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd; html lang=en xml:lang=en xmlns=http://www.w3.org/1999/xhtml; head titleThe Area/title meta http-equiv=Content-Type content=application/xhtml+xml; charset=utf-8 / I saved as xhtml and IE went daft. I saved as html and all seemed fine. However, the site I'm working on has a fair bit of PHP in it, so I saved it as .php. All seems fine, including IE. You can see my test page at: http://www.rhh.myzen.co.uk/rhh/thearea/area.php So, my seemingly silly question is: Is this OK? Does it fall apart for anybody? (mac esp?) and, of course, is it OK to do this, and indeed, is this what I 'should' be doing (Lachlan?) Many thanks, -- Best Regards, Bob McClelland Cornwall (UK) www.gwelanmor-internet.co.uk ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **
Re: [WSG] page check please - mime type!
It looks ok. It is validated. 2005/12/7, designer [EMAIL PROTECTED]: Dear colleagues, Forgive my labouring the point, but after our discussions I have done what Gunlaug did, i.e., made a page as xhtml, with the headers as below: !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd; html lang=en xml:lang=en xmlns=http://www.w3.org/1999/xhtml; head titleThe Area/title meta http-equiv=Content-Type content=application/xhtml+xml; charset=utf-8 / I saved as xhtml and IE went daft. I saved as html and all seemed fine. However, the site I'm working on has a fair bit of PHP in it, so I saved it as .php. All seems fine, including IE. You can see my test page at: http://www.rhh.myzen.co.uk/rhh/thearea/area.php So, my seemingly silly question is: Is this OK? Does it fall apart for anybody? (mac esp?) and, of course, is it OK to do this, and indeed, is this what I 'should' be doing (Lachlan?) Many thanks, -- Best Regards, Bob McClelland Cornwall (UK) www.gwelanmor-internet.co.uk ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help ** ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **
Re: [WSG] page check please - mime type!
designer wrote: Forgive my labouring the point, but after our discussions I have done what Gunlaug did, i.e., made a page as xhtml, with the headers as below: !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd; html lang=en xml:lang=en xmlns=http://www.w3.org/1999/xhtml; head titleThe Area/title meta http-equiv=Content-Type content=application/xhtml+xml; charset=utf-8 / Changing the MIME type in the meta element is completely useless, as the application needs to know the MIME type in order to know how to parse it *before* it begins parsing. Once it has reached that meta element, parsing has already begun. It is the MIME type sent by the server in the HTTP Content-Type header that matters, and for your page it sends text/html. See the HTTP headers: http://cgi.w3.org/cgi-bin/headers?url=http%3A%2F%2Fwww.rhh.myzen.co.uk%2Frhh%2Fthearea%2Farea.php You may see what happens when the page is really served as application/xhtml+xml. http://software.hixie.ch/utilities/cgi/content-type-proxy/content-type-proxy?uri=http%3A%2F%2Fwww.rhh.myzen.co.uk%2Frhh%2Fthearea%2Farea.phptype=application%2Fxhtml%2Bxml Note: The reason the stylesheet isn't applied at all in this case has nothing to do with it being served as XML, it's only because it's linked with a relative URI and via that proxy, it no longer points to the right place. If you change all paths to absolute URIs pointing to your server and the result will be better. It does, however, demonstrate that your page is at least well-formed. I saved as xhtml and IE went daft. I saved as html and all seemed fine. However, the site I'm working on has a fair bit of PHP in it, so I saved it as .php. All seems fine, including IE. Because it's php, you can use the header() function to send the correct Content-Type header. Place this before any content is output. header(Content-Type: application/xhtml+xml); However, doing so will lock out any IE users and Google, but you may as well completely remove the meta element, because it's only an inferior substitute for real HTTP headers. Use this instead: header(Content-Type: text/html; charset=UTF-8); If you choose to do content negotiation and serve application/xhtml+xml to browsers that support it and text/html to those that don't, be aware that it prevents incremental rendering in Mozilla. You can see my test page at: http://www.rhh.myzen.co.uk/rhh/thearea/area.php So, my seemingly silly question is: Is this OK? Does it fall apart for anybody? (mac esp?) and, of course, is it OK to do this, and indeed, is this what I 'should' be doing (Lachlan?) You may as well just use valid HTML 4.01 Strict. See XHTML is not for Beginners, the MIME type issue is just one of the many reasons. http://lachy.id.au/log/2005/12/xhtml-beginners (yes, I'm aware of the irony that the article itself is XHTML as text/html, but that's the useless default wordpress template that I'm too lazy to fix up) Lastly, with regard to the style element within the page: style type=text/css /*![CDATA[*/ !-- @import url(../css/areastyle.css); -- /*]]*/ /style You may as well remove the fake XML comment (!-- and --) in there, it's effectively useless these days, although keeping it as is will do no harm because of the CDATA section. Keep the /*![CDATA[*/ and /*]]*/ in there, they're the most effective way to handle the different parsing requirements of HTML and XHTML. See this article that discusses the issue in great detail: http://lachy.id.au/log/2005/05/script-comments -- Lachlan Hunt http://lachy.id.au/ ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **
Re: [WSG] page check please - mime type!
Looks fine in Mac Firefox 1.5 and Safari 2.02. Best regards, Marilyn Langfeld Langfeldesigns http://www.langfeldesigns.com [EMAIL PROTECTED] On Dec 7, 2005, at 8:13 AM, designer wrote: Dear colleagues, Forgive my labouring the point, but after our discussions I have done what Gunlaug did, i.e., made a page as xhtml, with the headers as below: !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd; html lang=en xml:lang=en xmlns=http://www.w3.org/1999/xhtml; head titleThe Area/title meta http-equiv=Content-Type content=application/xhtml+xml; charset=utf-8 / I saved as xhtml and IE went daft. I saved as html and all seemed fine. However, the site I'm working on has a fair bit of PHP in it, so I saved it as .php. All seems fine, including IE. You can see my test page at: http://www.rhh.myzen.co.uk/rhh/thearea/area.php So, my seemingly silly question is: Is this OK? Does it fall apart for anybody? (mac esp?) and, of course, is it OK to do this, and indeed, is this what I 'should' be doing (Lachlan?) Many thanks, -- Best Regards, Bob McClelland Cornwall (UK) www.gwelanmor-internet.co.uk ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help ** ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **
Re: [WSG] page check please - mime type!
Designer wrote: Dear colleagues, Forgive my labouring the point, but after our discussions I have done what Gunlaug did, i.e., made a page as xhtml, with the headers as below: !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd; html lang=en xml:lang=en xmlns=http://www.w3.org/1999/xhtml; head titleThe Area/title meta http-equiv=Content-Type content=application/xhtml+xml; charset=utf-8 / I saved as xhtml and IE went daft. I saved as html and all seemed fine. However, the site I'm working on has a fair bit of PHP in it, so I saved it as .php. All seems fine, including IE. You can see my test page at: http://www.rhh.myzen.co.uk/rhh/thearea/area.php So, my seemingly silly question is: Is this OK? Does it fall apart for anybody? (mac esp?) and, of course, is it OK to do this, and indeed, is this what I 'should' be doing (Lachlan?) Many thanks, Apart from using copyrighted images without attributing them :). It looks fine on Opera 8.5, Firefox 1.5. at 1280x1024. ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **
Re: [WSG] page check please - mime type!
On 12/7/05, Lachlan Hunt [EMAIL PROTECTED] wrote: If you choose to do content negotiation and serve application/xhtml+xml to browsers that support it and text/html to those that don't, be aware that it prevents incremental rendering in Mozilla. So is the best thing to target xhtml browsers? Like, specifically Opera, Safari, Konquerer, etc? How exactly would one do content negotation with PHP? -- -- Christian Montoya christianmontoya.com ... rdpdesign.com ... cssliquid.com ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **
RE: [WSG] page check please - mime type!
Mac report: Worked fine in Safari v1 - bottom margin of about 1.5em, same as top Worked okay in IE v5.2 - the bottom margin was extended 10em approx. Worked fine in Opera v8.51 - bottom margin approx 3em Personally I'd ignore the margin difference but I thought I'd mention it in case it bothers you. Mime type worked well. Will probably start using it myself. Regards Mike 2k:)2 Mike Foskett Web Standards, Accessibility Testing Consultant Communications British Educational Communications and Technology Agency (Becta) Milburn Hill Road, Science Park, Coventry CV4 7JJ Email: [EMAIL PROTECTED] Tel: 02476 416994 Ext 3342 [Tuesday - Thursday] Fax: 02476 411410 http://www.becta.org.uk -Original Message- From: Stephen Stagg [mailto:[EMAIL PROTECTED] Sent: 07 December 2005 15:39 To: wsg@webstandardsgroup.org Subject: Re: [WSG] page check please - mime type! Designer wrote: Dear colleagues, Forgive my labouring the point, but after our discussions I have done what Gunlaug did, i.e., made a page as xhtml, with the headers as below: !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd; html lang=en xml:lang=en xmlns=http://www.w3.org/1999/xhtml; head titleThe Area/title meta http-equiv=Content-Type content=application/xhtml+xml; charset=utf-8 / I saved as xhtml and IE went daft. I saved as html and all seemed fine. However, the site I'm working on has a fair bit of PHP in it, so I saved it as .php. All seems fine, including IE. You can see my test page at: http://www.rhh.myzen.co.uk/rhh/thearea/area.php So, my seemingly silly question is: Is this OK? Does it fall apart for anybody? (mac esp?) and, of course, is it OK to do this, and indeed, is this what I 'should' be doing (Lachlan?) Many thanks, Apart from using copyrighted images without attributing them :). It looks fine on Opera 8.5, Firefox 1.5. at 1280x1024. ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help ** ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **
Re: [WSG] page check please - mime type!
Lachlan Hunt wrote: You may as well just use valid HTML 4.01 Strict. See XHTML is not for Beginners, the MIME type issue is just one of the many reasons. http://lachy.id.au/log/2005/12/xhtml-beginners (yes, I'm aware of the irony that the article itself is XHTML as text/html, but that's the useless default wordpress template that I'm too lazy to fix up) It is an irony that I am prohibited from getting comments through to that article. However, it isn't important to me, since I can make up my own mind about the subject anyway. Hope others are able to do that too. The most important thing is to have knowledge to base ones choices on. As long as such information is available - and I found some that might be useful for beginners in that article, then it is up to each one to make use of that information. Hands-on experience is a must in order to get a full understanding though. regards Georg -- http://www.gunlaug.no ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **
Re: [WSG] page check please - mime type!
Christian Montoya wrote: doesn't work! You are all viewing text/html. Pretty soon everyone on this list will think they are serving xhtml. Yes, and a large percentage of them will serve complete garbage :-) I'll get it started right: DID NOT work in every single browser. Version 0.1 to 1000. IE/Mac/Linux/Sun. Sound better - and is probably 100% true. Since my approach to xhtml seems to be ever so slightly misunderstood by some, may I be allowed to link to an extended version of that approach. It seems to have worked reasonably well for me for the last couple of years. However, I wouldn't mind if someone proved me wrong on this, as there's always something to be learned on the subject of 'MIME type jumping'. It can be viewed as HTML4.01-equivalent XHTML1.0: http://www.gunlaug.no/contents/wd_1_06_03.html (will even work in IE/win - on a good day.) ...or as xhtml1.0 served and hopefully received as 'application/xhtml+xml': http://www.gunlaug.no/contents/wd_1_06_03.xhtml (this is what that page started out as. Need xml compliant browser, or one that can cheat so it appears to parse the code correctly.) ...or as *complete garbage*: http://www.gunlaug.no/contents/wd_1_06_03-notvalid.xhtml (shouldn't work anywhere - despite the fact that it has only _one_ un-encoded ampersand.) regards Georg -- http://www.gunlaug.no ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **
Re: [WSG] page check please - mime type!
Sorry, just the map you used. My comment was meant light-heartedly. Your location map looks very like the one that can be got from http://www.ordnancesurvey.co.uk/oswebsite/. As these are crown copyright, I assume that you haven't got an agreement with them to use their data unattributed. Even their website has the text: Image reproduced with permission of Ordnance Survey and Ordnance Survey of Northern Ireland below each image. designer wrote: Duh? Stephen? Stephen Stagg wrote: Apart from using copyrighted images without attributing them :). Best Regards, Bob McClelland Cornwall (UK) www.gwelanmor-internet.co.uk ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help ** ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **
Re: [WSG] page check please - mime type!
Gunlaug Sørtun wrote: Lachlan Hunt wrote: http://lachy.id.au/log/2005/12/xhtml-beginners I am prohibited from getting comments through to that article. That's weird, if you contact me off list and let me know what error you received I might be able to do something about it. If you send me your comment, I can add it for you. However, it isn't important to me, since I can make up my own mind about the subject anyway. Hope others are able to do that too. As I wrote in the article, those who are competent enough to make an informed decision may do so. Beginners who've never even built a web page before can hardly be considered as knowledgeable on the subject and wouldn't be able to make a fully informed decision. -- Lachlan Hunt http://lachy.id.au/ ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **