开发者

Why don't web browsers have built in validators?

开发者 https://www.devze.com 2022-12-29 11:13 出处:网络
As far as I know there is no web browser with built in validators for HTML, CSS and JavaScript. Developing web pages without validation is like using a compiler that doesn\'t do syntax analysis. Even

As far as I know there is no web browser with built in validators for HTML, CSS and JavaScript. Developing web pages without validation is like using a compiler that doesn't do syntax analysis. Even Firefox with its excellent plugins aimed at developers like Firebug lacks plugins for CSS and JavaScript validation. Wouldn't it be useful to have t开发者_如何学JAVAhese plugins? Am I missing something?


Web browsers are made for viewing things. The main use of browser is to render a page, even if the code is not valid (like, using "quirks" mode et cetera). Having a validator built into that is fine for developers, but absolutely unnecessary for users.


Actually, now that you ask, I think a validator should really belong to a web browser. A browser is though an end-user tool for content delivery, it is as much a first tool in a developer's workshop.

Yep, I agree, validators for (X)HTML and CSS should be there. Since a browser is doing this checking anyway, at least, for itself, internally, there is no reason why it couldn't display the validation output.


There is a HTML Validator extension for Firefox.


You are probably missing the point that most users of a browser are not developers and have no interest in validation.

Web browsers are complicated beasts and are used for many different types of applications. A web browser developer has to think hard and long before adding any feature to their browser - a feature that will break most web pages for most people will kill a browser fairly quickly ;)


Worth noting that if you use application/xhtml+xml as your MIME type, Firefox will perform a well-formedness check at least.


Internet Explorer 8 has a built in links to the W3C validators: press F12 and the select Validate menu.

Multiple Firefox extensions (including Web Developer Tools) have similar functions.


Opera has a "validate" option too. However, like in IE8, this is done via the W3C validator.

0

精彩评论

暂无评论...
验证码 换一张
取 消