Deprecated: Creation of dynamic property wpdb::$categories is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/wp-db.php on line 668
Deprecated: Creation of dynamic property wpdb::$post2cat is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/wp-db.php on line 668
Deprecated: Creation of dynamic property wpdb::$link2cat is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/wp-db.php on line 668
Deprecated: Return type of WP_Theme::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/class-wp-theme.php on line 554
Deprecated: Return type of WP_Theme::offsetGet($offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/class-wp-theme.php on line 595
Deprecated: Return type of WP_Theme::offsetSet($offset, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/class-wp-theme.php on line 535
Deprecated: Return type of WP_Theme::offsetUnset($offset) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/class-wp-theme.php on line 544
Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/comment-template.php on line 1739
Deprecated: wp_getimagesize(): Implicitly marking parameter $image_info as nullable is deprecated, the explicit nullable type must be used instead in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/media.php on line 5006
Deprecated: Return type of WP_REST_Request::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/rest-api/class-wp-rest-request.php on line 960
Deprecated: Return type of WP_REST_Request::offsetGet($offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/rest-api/class-wp-rest-request.php on line 980
Deprecated: Return type of WP_REST_Request::offsetSet($offset, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/rest-api/class-wp-rest-request.php on line 992
Deprecated: Return type of WP_REST_Request::offsetUnset($offset) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/rest-api/class-wp-rest-request.php on line 1003
Deprecated: Return type of WP_Block_List::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/class-wp-block-list.php on line 151
Deprecated: Return type of WP_Block_List::next() should either be compatible with Iterator::next(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/class-wp-block-list.php on line 175
Deprecated: Return type of WP_Block_List::key() should either be compatible with Iterator::key(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/class-wp-block-list.php on line 164
Deprecated: Return type of WP_Block_List::valid() should either be compatible with Iterator::valid(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/class-wp-block-list.php on line 186
Deprecated: Return type of WP_Block_List::rewind() should either be compatible with Iterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/class-wp-block-list.php on line 138
Deprecated: Return type of WP_Block_List::offsetExists($index) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/class-wp-block-list.php on line 75
Deprecated: Return type of WP_Block_List::offsetGet($index) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/class-wp-block-list.php on line 89
Deprecated: Return type of WP_Block_List::offsetSet($index, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/class-wp-block-list.php on line 110
Deprecated: Return type of WP_Block_List::offsetUnset($index) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/class-wp-block-list.php on line 127
Deprecated: Return type of WP_Block_List::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/class-wp-block-list.php on line 199
Deprecated: Jetpack::setup_xmlrpc_handlers(): Implicitly marking parameter $xmlrpc_server as nullable is deprecated, the explicit nullable type must be used instead in /homepages/34/d43362328/htdocs/ydontu/blog/wp-content/plugins/jetpack/class.jetpack.php on line 939
Deprecated: Automattic\Jetpack\Connection\Manager::setup_xmlrpc_handlers(): Implicitly marking parameter $xmlrpc_server as nullable is deprecated, the explicit nullable type must be used instead in /homepages/34/d43362328/htdocs/ydontu/blog/wp-content/plugins/jetpack/vendor/automattic/jetpack-connection/src/class-manager.php on line 110
Deprecated: Creation of dynamic property Automattic\Jetpack\Connection\Manager::$error_handler is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-content/plugins/jetpack/vendor/automattic/jetpack-connection/src/class-manager.php on line 80
Deprecated: Creation of dynamic property WPCOM_REST_API_V2_Endpoint_Instagram_Gallery::$is_wpcom is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-content/plugins/jetpack/_inc/lib/core-api/wpcom-endpoints/class-wpcom-rest-api-v2-endpoint-instagram-gallery.php on line 23
Deprecated: Creation of dynamic property WPCOM_REST_API_V2_Endpoint_Mailchimp::$wpcom_is_wpcom_only_endpoint is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-content/plugins/jetpack/_inc/lib/core-api/wpcom-endpoints/class-wpcom-rest-api-v2-endpoint-mailchimp.php on line 17
Deprecated: Creation of dynamic property WPCOM_REST_API_V2_Endpoint_Tweetstorm_Gather::$wpcom_is_wpcom_only_endpoint is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-content/plugins/jetpack/_inc/lib/core-api/wpcom-endpoints/class-wpcom-rest-api-v2-endpoint-tweetstorm-gather.php on line 21
Deprecated: Creation of dynamic property WPCOM_REST_API_V2_Endpoint_Tweetstorm_Gather::$is_wpcom is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-content/plugins/jetpack/_inc/lib/core-api/wpcom-endpoints/class-wpcom-rest-api-v2-endpoint-tweetstorm-gather.php on line 22
Deprecated: Creation of dynamic property WPCOM_REST_API_V2_Endpoint_Gutenberg_Available_Extensions::$wpcom_is_site_specific_endpoint is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-content/plugins/jetpack/_inc/lib/core-api/wpcom-endpoints/gutenberg-available-extensions.php on line 20
Deprecated: Creation of dynamic property WPCOM_REST_API_V2_Endpoint_Memberships::$wpcom_is_wpcom_only_endpoint is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-content/plugins/jetpack/_inc/lib/core-api/wpcom-endpoints/memberships.php on line 23
Deprecated: Creation of dynamic property WPCOM_REST_API_V2_Endpoint_Memberships::$wpcom_is_site_specific_endpoint is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-content/plugins/jetpack/_inc/lib/core-api/wpcom-endpoints/memberships.php on line 24
Deprecated: Creation of dynamic property WPCOM_REST_API_V2_Endpoint_Subscribers::$wpcom_is_wpcom_only_endpoint is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-content/plugins/jetpack/_inc/lib/core-api/wpcom-endpoints/subscribers.php on line 15
Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /homepages/34/d43362328/htdocs/ydontu/blog/wp-content/plugins/jetpack/extensions/blocks/podcast-player/podcast-player.php on line 157
Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /homepages/34/d43362328/htdocs/ydontu/blog/wp-content/plugins/jetpack/extensions/blocks/podcast-player/podcast-player.php on line 157
Deprecated: Creation of dynamic property Automattic\Jetpack\Sync\Queue::$random_int is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-content/plugins/jetpack/vendor/automattic/jetpack-sync/src/class-queue.php on line 38
Deprecated: Creation of dynamic property Automattic\Jetpack\Sync\Queue::$random_int is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-content/plugins/jetpack/vendor/automattic/jetpack-sync/src/class-queue.php on line 38
Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /homepages/34/d43362328/htdocs/ydontu/blog/wp-content/plugins/jetpack/modules/widgets/migrate-to-core/image-widget.php on line 195
Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /homepages/34/d43362328/htdocs/ydontu/blog/wp-content/plugins/jetpack/modules/widgets/migrate-to-core/gallery-widget.php on line 56
Deprecated: Creation of dynamic property Publicize_UI::$in_jetpack is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-content/plugins/jetpack/modules/publicize.php on line 53
Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /homepages/34/d43362328/htdocs/ydontu/blog/wp-content/plugins/jetpack/modules/calypsoify/class-jetpack-calypsoify.php on line 128
Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /homepages/34/d43362328/htdocs/ydontu/blog/wp-content/plugins/jetpack/modules/calypsoify/class-jetpack-calypsoify.php on line 129
Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /homepages/34/d43362328/htdocs/ydontu/blog/wp-content/plugins/jetpack/modules/calypsoify/class-jetpack-calypsoify.php on line 133
Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /homepages/34/d43362328/htdocs/ydontu/blog/wp-content/plugins/jetpack/modules/calypsoify/class-jetpack-calypsoify.php on line 134
Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /homepages/34/d43362328/htdocs/ydontu/blog/wp-content/plugins/jetpack/modules/calypsoify/class-jetpack-calypsoify.php on line 135
Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /homepages/34/d43362328/htdocs/ydontu/blog/wp-content/plugins/jetpack/modules/simple-payments/simple-payments.php on line 219
Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /homepages/34/d43362328/htdocs/ydontu/blog/wp-content/plugins/jetpack/modules/simple-payments/simple-payments.php on line 220
Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /homepages/34/d43362328/htdocs/ydontu/blog/wp-content/plugins/jetpack/modules/simple-payments/simple-payments.php on line 227
Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /homepages/34/d43362328/htdocs/ydontu/blog/wp-content/plugins/jetpack/modules/simple-payments/simple-payments.php on line 229
Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /homepages/34/d43362328/htdocs/ydontu/blog/wp-content/plugins/jetpack/modules/simple-payments/simple-payments.php on line 231
Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /homepages/34/d43362328/htdocs/ydontu/blog/wp-content/plugins/jetpack/modules/simple-payments/simple-payments.php on line 248
Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /homepages/34/d43362328/htdocs/ydontu/blog/wp-content/plugins/jetpack/modules/simple-payments/simple-payments.php on line 249
Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /homepages/34/d43362328/htdocs/ydontu/blog/wp-content/plugins/jetpack/modules/simple-payments/simple-payments.php on line 267
Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /homepages/34/d43362328/htdocs/ydontu/blog/wp-content/plugins/jetpack/modules/simple-payments/simple-payments.php on line 268
Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /homepages/34/d43362328/htdocs/ydontu/blog/wp-content/plugins/jetpack/modules/simple-payments/simple-payments.php on line 270
Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /homepages/34/d43362328/htdocs/ydontu/blog/wp-content/plugins/jetpack/modules/simple-payments/simple-payments.php on line 271
Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /homepages/34/d43362328/htdocs/ydontu/blog/wp-content/plugins/jetpack/modules/simple-payments/simple-payments.php on line 273
Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /homepages/34/d43362328/htdocs/ydontu/blog/wp-content/plugins/jetpack/modules/simple-payments/simple-payments.php on line 275
Deprecated: Creation of dynamic property WPCOM_Widget_Goodreads::$shelves is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-content/plugins/jetpack/modules/widgets/goodreads.php on line 33
Deprecated: DateTime::__construct(): Passing null to parameter #1 ($datetime) of type string is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/script-loader.php on line 348
Deprecated: Creation of dynamic property WP_Block_Type::$plan_check is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/class-wp-block-type.php on line 333
Deprecated: Creation of dynamic property WP_Block_Type::$plan_check is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/class-wp-block-type.php on line 333
Deprecated: Creation of dynamic property WP_Block_Type::$plan_check is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/class-wp-block-type.php on line 333
Deprecated: Creation of dynamic property WP_Block_Type::$plan_check is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/class-wp-block-type.php on line 333
Deprecated: Creation of dynamic property WP_Block_Type::$plan_check is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/class-wp-block-type.php on line 333
Deprecated: Creation of dynamic property WP_Block_Type::$plan_check is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/class-wp-block-type.php on line 333
Deprecated: Creation of dynamic property Jetpack_Shortcode_Unavailable::$shortcodes is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-content/plugins/jetpack/modules/shortcodes/unavailable.php on line 19
Deprecated: ltrim(): Passing null to parameter #1 ($string) of type string is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/wp-db.php on line 3030
May | 2006 | Why Dont You Blog? | Page 2
It’s really hard to choose a decent sig. Anything anyone with taste might reasonably want has already well gone.All the same, there is little excuse for some of the ones I’ve seen recently.
MSN messenger provides emoticon images for sticking in your Msn messages, not for sticking hearts and smileys in a huge string as your user name. This is barely acceptable from kids. Anyone over the age of 16 had better have a good reason for it and I find it hard to think of one.
There is absolutely no excuse for a smiley face in your sig.
I’m not going to go on to a second point because there will be no stopping me. You know who you are.
I’m not claiming the moral high ground here. I  have rubbish user names for everything I do and I can never even remember them so I set them up and then can’t remember them to get back in to whatever i joined. All I can say is that I have never knowingly used any silly pictures or deliberately soppy names,
Sorry about this, it’s not ground-breakingly brilliant but it’s entertaining. There is something good about having a mathematician and his physicist not-quite girlfriend as the relatively glamourous heros of a cop show. This makes a change from scientists always being portrayed as total geeks.
There is an odd physicist as well – the short guy from Ally McBeal – but there are odd non-scientists – liek the man who used too be the central character in Taxi. The programme doesn’t necessarily assume that having mathematical skills makes you a social outcast, which is nice.
“This month, NO2ID and a growing number of other organisations* ask that you renew your passport… Did you know that, from October of this year, as preparation for the ID scheme, ALL first-time passport applicants will have background checks and be interviewed by officials at one of the government’s 69 new ‘enrolment centres’? This will include your children as they reach 16“ (http://www.no2id.net/ 7 May 2006) At the moment, existing passport holders are not included in this but they will be.
Granted this means coming up with £51 now, but the ID style one will cost at least £93, according to no2ID. And will get you stuck in the sytem for life.
Anti-ID rants have been a bit lacking here for a few weeks, so I thought I’d better do some web searching about the current state of the inexorable march of ID. I found this excellent quote on http://www.no2id.net/ :
“I’ve read Orwell’s ‘1984’ – I don’t want my kids to live in it.” Andy..
There is an interesting article on the excellent no2id.net site that refers to the plan to merge the Office of National Statistics’ Citizen Information Project with the iD database, at even greater expense but allegedly saving millions after 2021. (Hmm. If anyone knows of a database that has stayed in the same format on the same hardware for more than 5 years, please tell me. Not to mention, if anyone has the capacity to calculate costs in a decade and a half’s time)
The same article links to an article in the Times that refers to a plan to add medical information to the ID database, allegedly to save lives in emergency situations while at the same time helping to prevent people without valid cards from accessing NHS resources. It brings up a quite disturbing image of doctors turning away sick and injured people who haven’t got the right ID.
And, I don’t know about you, but I find the idea of plague carriers remaining untreated personally threatening. In “The Gift Relationship,” Richard Titmuss argued years ago that Britishtransfusion service blood was far safer than US blood because it was donated out of altruism rather than a need for money. i.e Altruism in health care is more profitable for public health than selfishness.
I think this principle can be extended to the illegal immigrants gaining access to the NHS. I would much rather pay my NHS contribution and accept that the occasional person who hasn’t paid gets treated than rigorously exclude everyone who hasn’t paid their stamp and risk dying of TB or AIDS.
I am totally distressed to see that David Cameron said on May 3 that he would stop the ID fiasco. http://www.no2id.net/news/newsblog/index.php Distressed because it’s dispiriting to see that I am agreeing with a Tory leader on an issue of public security for the first time in my life. Old age is creeping up on me it appears.
By the way, http://www.no2id.net/ sells good-looking t-shirts that say NO ID. I have to get some.
The wonderful David Attenborough is 80. When most octogenarians are lucky if they aren’t in a grim care home, Attenborough is still actively promoting his concerns for the environment. (http://news.bbc.co.uk/1/hi/magazine/4976552.stm) He must be the best-ever presenter/creator of science and nature programmes. Every year, he brings amazing new content to remind us of the fragile diversity of life on Earth.
Attenborough has had a wonderful life, having seen so many of the fragile marvels of the world. He personifies all the positive qualities of an ideal of aristocratic Englishness – adventurousness, intelligence, wit,  moral worth, charm, willingness to endure hardships and joys with equal stoicism – that were rarely found in reality rather than ideology.Ă‚Â
Digital channels have been showing his programmes from throughout the past decades. These are almost always brilliant. In his BBC radio interview, he is careful to credit the cameramen as the real creators of the stunning footage that we associate with Attenborough. However, it is his majestic and much parodied  delivery that makes so many of these programmes unforgettable.
The BBC site says that he got his first presentation job by chance, despite the misgivings of an administrator over the size of his teeth. This suggests that a modern Attenborough would be unlikely to get near the screen. Present day tv presenters tend to be either comedy “mad scientist” stereotypes or perfectly groomed forgettable clones. Attenborough is certainly distinctive without ever being a hysterical mad scientist. His delivery is perfectly judged. His voice is unmistakable, with its odd tendency to whisper for greater effect.  He approaches the viewer as someone like himself, with all the aristocratic virtues.
If ever there was a 50s “Boys Own” hero in the real world, David Attenborough comes close.
An excellent photo catching Warwick Castle from an amazing angle. In this picture you can clearly see the well designed, and well laid out, gardens that surround the castle.
The distance in the photo is implied by the fact the castle (which is reasonably large) looks like a toy model!
This is also a photo I couldnt help but add to the blog 🙂 This is the evening sky over Reculver Roman fort.
For info – the fort was originally built as part of the Saxon Shore defences and, after falling into disuse, found a new life as both a Saxon settlement (ironically) and then a medieval stronghold.
As mentioned in the last post, there is an excellent article available at http://www.autisticcuckoo.net/archive.php?id=2004/ 11/03/ content-negotiation, but sadly the author of this article has expressed his disinterest in continuing with his blog. While it is possible that he will continue to pay his hosting fees and continue to re-register the domain name, this is not certain so, to try and at least retain this article we have copied it (verbatim) below.
We have, for some time, tried to inform people about the fact that there is no point whatsoever in using XHTML as long as you serve the documents with a text/html media type. For those who still want to use XHTML and gain at least something for some
users, we have recommended content negotiation. On several occasions people have asked us to publish a write-up on how to do that, but there hasn’t been time to sit down and write it. Now, finally, we have tried to whip something together that we hope can serve as a guide.
What Is Content Negotiation?
Content negotiation means that the server in one way or another negotiates with a user agent (browser, search engine, etc) that requests a document. The negotiation means that the user agent announces which media types (also called content type or MIME type) it can handle and, optionally, which one it prefers. The server then serves the document in the way that best suits the user agent.
The user agent announces which media types it can handle through a header in the HTTP request it sends to the server. The header is called Accept and can look something like this:
The example is what our instance of Mozilla sends. (We have inserted blanks between the media types so that the text will wrap.) Our interest now lies with application/xhtml+xml and
text/html;q=0.9. The part after the semi-colon, q=0.9, is called a quality value and is a value between 0 and 1, inclusive, with up to three decimal places. The higher the quality value, the more the user agent prefers that media type. If no quality value is specified for a particular media type, it means q=1.0. The example thus shows that Mozilla prefers application/xhtml+xml to text/html.
The usual meaning of content negotiation is that the HTTP server itself decides which media type the user agent prefers, and then automatically chooses between a number of different documents. Normally the file suffix is used to associate to different media types, so the server might choose between
index.xhtml and index.html.
This article describes another type of content negotiation; one that is performed through a server-side script. Most web hosts offer some kind of server-side scripting, usually PHP or ASP. Our example uses PHP, since it is available for more platforms and is open source, while ASP is Microsoft-specific. We don’t delve into the finer details here, but presume that you are sufficiently familiar with PHP.
To round off this explanation of what content negotiation means, we want to emphasise that it’s not merely an issue of deciding which media type to send. When you have chosen a media type, you should also serve the document with a content that corresponds to the chosen media type. You either serve XHTML as application/xhtml+xml, or you serve HTML as text/html.
About the Examples
The code samples in this article are written for PHP 4.1.0 or higher. For older versions you need to replace $_SERVER with $HTTP_SERVER_VARS. If the code is executed in a function, you then need to declare the array as a global (global $HTTP_SERVER_VARS;).
This article presumes that the document’s content is marked up as XHTML 1.1, and that it doesn’t contain anything that cannot be converted into HTML 4.01 Strict, for instance element from other XML namespaces, or CDATA sections.
Parsing the Accept Header
First of all we need to find out whether or not the user agent supports the application/xhtml+xml media type and, if so, whether it prefers that to text/html.
$xhtml = false;
if (preg_match('/application\/xhtml\+xml(;q=(\d+\.\d+))?/i', $_SERVER['HTTP_ACCEPT'], $matches)) {
$xhtmlQ = isset($matches[2]) ? $matches[2] : 1;
if (preg_match('/text\/html(;q=(\d+\.\d+))?/i', $_SERVER['HTTP_ACCEPT'], $matches)) {
$htmlQ = isset($matches[2]) ? $matches[2] : 1;
$xhtml = ($xhtmlQ >= $htmlQ);
} else {
$xhtml = true;
}
}
The $xhtml variable indicates whether or not we will serve the document as XHTML. The initial value is false, since many older browsers lack support for XHTML.
On line 2 we check whether the Accept header contains application/xhtml+xml plus an optional quality value. This regular expression isn’t 100% fool-proof, since it doesn’t limit the value range to [0,1], nor does it limit the number of decimal places to 3. For all intents and purposes, however, it doesn’t matter.
On line 3 we extract the quality value, if present. If not, we set the quality value for application/xhtml+xml to 1.
On lines 4 and 5 we perform the corresponding check for text/html. Line 6 compares the quality values and sets $xhtml=true if the user agent prefers application/xhtml+xml to text/html. Line 8 handles the case of a user agent that specifies application/xhtml+xml in the
Accept header, but not text/html.
After these lines of code we thus have a Boolean variable, $xhtml, which indicates whether the document will be served as XHTML.
Prepare HTML Conversion
If the user agent doesn’t support XHTML, or if it prefers HTML, we have to convert the document’s content from XHTML 1.1 to HTML 4.01. We do this with a simple function:
function xml2html($buffer)
{
$xml = array('/>', 'xml:lang=');
$html = array('>', 'lang=');
return str_replace($xml, $html, $buffer);
}
Lines 3 and 4 declare two arrays, where the elements in the $xml array will be replaced by the corresponding element in the $html array.
On line 5 each occurrence of /> is replaced by > in the $buffer string. At the same time, each occurrence of xml:lang is replaced by lang.
And Finally…
Only a few details now remain. If the $xhtml variable is true, we need to write the document type declaration for XHTML 1.1 and a <html> element with the proper XML namespace. Most likely we also want to start with an XML
declaration, and link to our style sheets through processing instructions.
If the user agent doesn’t want XHTML, we need to write a document type declaration for HTML 4.01 Strict and a <html> element without an XML namespace. Style sheets should be linked through ordinary <link> elements (or be imported in a <style> element). Furthermore, we need to instruct the PHP interpreter to buffer all output to the response stream, and to call our conversion function on the result before sending it back to the user agent.
Before we write anything at all, however, we must send a couple of HTTP headers: one that says which media type we use, and one that informs proxy servers that content negotiation has taken place so that they can consider that in their caching algorithms.
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">', "\n";
echo '<html lang="en">', "\n";
}
Don’t forget to link to the style sheets in the <head> if the document is served as HTML.
There is a blatant shortcoming in the example shown in this article: the W3C validator. It doesn’t send application/xhtml+xml in its Accept
header, so it’s impossible to validate the document as XHTML. It is trivial to let a query parameter control the choice of media type, but that is left as an exercise for the reader.
(note: We are aware of some possible copyright issues, and we have attempted to contact the original owner to get permission to repost it verbatim here. At the time of this post, no replies had been received and we can only assume the original source is no longer on line. If you are the original source and would like this post removed please contact us and we will take this post down immediately)
Well, the ongoing quest for excellence continues 🙂 Here are some web sites relating to CSS I have been looking at today. All quite interesting and well worth checking out:
I often watch my network traffic in an idly interested way, networks being more or less incomprehensible to me. (I can watch the network actiivity and identify various bits of it, even enjoying picking my own passwords out of the ether.  I can reproduce the 7-layer model perfectly adequately. I don’t have a mental model of how they connect together. I sometimes almost grasp it but, half a minute later, it’s like knitting fog.)
I have recently noticed lots of packets with “bogus IP headers” or “malformed” or zero length packets, according to Ethereal. From my limited knowledge this tends to indicate a Trojan attack – no novelty to me, who appears to be Helen with regard to Trojans.
In the past few days, I’ve also noticed loads of packets that say “packet cable lawful intercept.” It turns out that this is due to Ethereal confusing VOIP traffic with “lawful intercept” traffic.Ă‚Â
The concept interested me so I did some research. In case you don’t know what “lawful intercept” is, it seems that it means that your traffic has to be open to surveillance. It’s not the easiest thing in the world to understand. In fact it’s not even within loudhailer shouting distance of the easiest thing in the world to understand. That’s my excuse for not explaining it here.
Try googling http://www.google.co.uk/search?hl=en&q=packet+cable+lawful+intercept&meta= if you think you’ll be able to make head or tale of it. It disturbs me, but then I’m probably just clinging to an outdated view that personal privacy was supposed to be one of the benefits of not living in a totalitarian state…..
Ok, following recent months we, here at Why Dont You have been quick to berate the various PC / Internet magazines available in the UK.
Whilst remote, there is a chance that this month things have changed. The latest .net magazine has arrived and (very) early indications are it is an improvement over previous poor showings.
This will be backed up with some more depth over the next couple of days as each bit is put to the test, but from the early scans it actually seems like a useful edition of the magazine.
Dont be too complacent though, there is a LOT of fluff in it – like several pages re-hashing old info in the guise of 150th issue celebrations. It is sad when a “cutting edge” magazine has to dedicate so much space to history…
Deprecated: ltrim(): Passing null to parameter #1 ($string) of type string is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/wp-db.php on line 3030
Deprecated: Creation of dynamic property WP_Term::$link is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 749
Deprecated: Creation of dynamic property WP_Term::$id is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 750
Deprecated: Creation of dynamic property WP_Term::$link is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 749
Deprecated: Creation of dynamic property WP_Term::$id is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 750
Deprecated: Creation of dynamic property WP_Term::$link is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 749
Deprecated: Creation of dynamic property WP_Term::$id is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 750
Deprecated: Creation of dynamic property WP_Term::$link is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 749
Deprecated: Creation of dynamic property WP_Term::$id is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 750
Deprecated: Creation of dynamic property WP_Term::$link is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 749
Deprecated: Creation of dynamic property WP_Term::$id is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 750
Deprecated: Creation of dynamic property WP_Term::$link is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 749
Deprecated: Creation of dynamic property WP_Term::$id is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 750
Deprecated: Creation of dynamic property WP_Term::$link is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 749
Deprecated: Creation of dynamic property WP_Term::$id is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 750
Deprecated: Creation of dynamic property WP_Term::$link is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 749
Deprecated: Creation of dynamic property WP_Term::$id is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 750
Deprecated: Creation of dynamic property WP_Term::$link is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 749
Deprecated: Creation of dynamic property WP_Term::$id is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 750
Deprecated: Creation of dynamic property WP_Term::$link is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 749
Deprecated: Creation of dynamic property WP_Term::$id is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 750
Deprecated: Creation of dynamic property WP_Term::$link is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 749
Deprecated: Creation of dynamic property WP_Term::$id is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 750
Deprecated: Creation of dynamic property WP_Term::$link is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 749
Deprecated: Creation of dynamic property WP_Term::$id is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 750
Deprecated: Creation of dynamic property WP_Term::$link is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 749
Deprecated: Creation of dynamic property WP_Term::$id is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 750
Deprecated: Creation of dynamic property WP_Term::$link is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 749
Deprecated: Creation of dynamic property WP_Term::$id is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 750
Deprecated: Creation of dynamic property WP_Term::$link is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 749
Deprecated: Creation of dynamic property WP_Term::$id is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 750
Deprecated: Creation of dynamic property WP_Term::$link is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 749
Deprecated: Creation of dynamic property WP_Term::$id is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 750
Deprecated: Creation of dynamic property WP_Term::$link is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 749
Deprecated: Creation of dynamic property WP_Term::$id is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 750
Deprecated: Creation of dynamic property WP_Term::$link is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 749
Deprecated: Creation of dynamic property WP_Term::$id is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 750
Deprecated: Creation of dynamic property WP_Term::$link is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 749
Deprecated: Creation of dynamic property WP_Term::$id is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 750
Deprecated: Creation of dynamic property WP_Term::$link is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 749
Deprecated: Creation of dynamic property WP_Term::$id is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 750
Deprecated: Creation of dynamic property WP_Term::$link is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 749
Deprecated: Creation of dynamic property WP_Term::$id is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 750
Deprecated: Creation of dynamic property WP_Term::$link is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 749
Deprecated: Creation of dynamic property WP_Term::$id is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 750
Deprecated: Creation of dynamic property WP_Term::$link is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 749
Deprecated: Creation of dynamic property WP_Term::$id is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 750
Deprecated: Creation of dynamic property WP_Term::$link is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 749
Deprecated: Creation of dynamic property WP_Term::$id is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 750
Deprecated: Creation of dynamic property WP_Term::$link is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 749
Deprecated: Creation of dynamic property WP_Term::$id is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 750
Deprecated: Creation of dynamic property WP_Term::$link is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 749
Deprecated: Creation of dynamic property WP_Term::$id is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 750
Deprecated: Creation of dynamic property WP_Term::$link is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 749
Deprecated: Creation of dynamic property WP_Term::$id is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 750
Deprecated: Creation of dynamic property WP_Term::$link is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 749
Deprecated: Creation of dynamic property WP_Term::$id is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 750
Deprecated: Creation of dynamic property WP_Term::$link is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 749
Deprecated: Creation of dynamic property WP_Term::$id is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 750
Deprecated: Creation of dynamic property WP_Term::$link is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 749
Deprecated: Creation of dynamic property WP_Term::$id is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 750
Deprecated: Creation of dynamic property WP_Term::$link is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 749
Deprecated: Creation of dynamic property WP_Term::$id is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 750
Deprecated: Creation of dynamic property WP_Term::$link is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 749
Deprecated: Creation of dynamic property WP_Term::$id is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 750
Deprecated: Creation of dynamic property WP_Term::$link is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 749
Deprecated: Creation of dynamic property WP_Term::$id is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 750
Deprecated: Creation of dynamic property WP_Term::$link is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 749
Deprecated: Creation of dynamic property WP_Term::$id is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 750
Deprecated: Creation of dynamic property WP_Term::$link is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 749
Deprecated: Creation of dynamic property WP_Term::$id is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 750
Deprecated: Creation of dynamic property WP_Term::$link is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 749
Deprecated: Creation of dynamic property WP_Term::$id is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 750
Deprecated: Creation of dynamic property WP_Term::$link is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 749
Deprecated: Creation of dynamic property WP_Term::$id is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 750
Deprecated: Creation of dynamic property WP_Term::$link is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 749
Deprecated: Creation of dynamic property WP_Term::$id is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 750
Deprecated: Creation of dynamic property WP_Term::$link is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 749
Deprecated: Creation of dynamic property WP_Term::$id is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 750
Deprecated: Creation of dynamic property WP_Term::$link is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 749
Deprecated: Creation of dynamic property WP_Term::$id is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 750
Deprecated: Creation of dynamic property WP_Term::$link is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 749
Deprecated: Creation of dynamic property WP_Term::$id is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 750
Deprecated: Creation of dynamic property WP_Term::$link is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 749
Deprecated: Creation of dynamic property WP_Term::$id is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 750
Deprecated: Creation of dynamic property WP_Term::$link is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 749
Deprecated: Creation of dynamic property WP_Term::$id is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 750
Deprecated: Creation of dynamic property WP_Term::$link is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 749
Deprecated: Creation of dynamic property WP_Term::$id is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 750
Deprecated: Creation of dynamic property WP_Term::$link is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 749
Deprecated: Creation of dynamic property WP_Term::$id is deprecated in /homepages/34/d43362328/htdocs/ydontu/blog/wp-includes/category-template.php on line 750