Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

Currently i'm using latest stable version of PHP, webmastering a online shop with Doctype XHTML.

Most of our customers use "old" browsers, 25% use IE8, 10% use IE7, 3% IE6 (however, IE6 never purchase, the shop looks weird in IE6 because of PNG usage - we are not willing to strongly support IE6 anymore). Rest: FF, Chrome, div.

Currently, I pretty much like the way, tidy cleans up the page. It provides better UTF8-Support, adds ommitted tags and - most important to me - always provides a w3-valid website (so I can put the badge on it).

What I don't like is the missing development of the extension. I feel, it is quite impossible to make the page HTML5-ready. Why would I want to use HTML5? Mainly because auf schema.org. Our page added some product Info in microformats, however they are not supported very well. Microdata would be better.

  • So, is it still adviseable to use html tidy just to get a "cleaner" source code, or should I provide HTML5-Support. (I would still have to use tidy for user-input like the description of our products).

  • Moreover, will "older" browsers have problems with HTML5 or will they just ignore it?

  • And last but not least: Will avoiding tidy speed up my page?

Thank you.

share|improve this question
add comment

1 Answer 1

up vote 5 down vote accepted

So, is it still advisable to use html tidy just to get a "cleaner" source code, or should I provide HTML5-Support. (I would still have to use tidy for user-input like the description of our products).

It's possible to do both, either by configuring HTML Tidy to process HTML5 (see this question and specifically this answer) or by using another library that supports HTML5 such as HTMLawed.

Moreover, will "older" browsers have problems with HTML5 or will they just ignore it?

Older browsers, notably Firefox 2 and IE6, do have problems with the new HTML5 tags. There are several workarounds, though, the most popular of which is the html5.js script from the HTML5 doctor site. That means there's no good excuse not to use HTML5 today.

And last but not least: will avoiding tidy speed up my page?

Avoiding any kind of additional processing will usually speed up your page. You should cache the static HTML that your tidy script generates so that it's not running on every page load. At it's simplest, this means writing the generated file to disk as an HTML file and serving that instead of the PHP script unless the content has changed. That's beyond the scope of your original question, but this question may prove useful.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.