How to scan HTML and javascript files for cross browser compatability? - Stack Overflow

I'm looking for a tool that will scan my HTML and JS files and report whether the scripts are cros

I'm looking for a tool that will scan my HTML and JS files and report whether the scripts are cross browser patible or not. I'm not really interested in an online tool which I have to enter all my URL's.

I'm looking for a tool that will scan my HTML and JS files and report whether the scripts are cross browser patible or not. I'm not really interested in an online tool which I have to enter all my URL's.

Share Improve this question edited Jun 7, 2010 at 17:42 BalusC 1.1m376 gold badges3.6k silver badges3.6k bronze badges asked Jun 7, 2010 at 15:46 jranaudojranaudo 512 bronze badges 1
  • I removed the JSP part from the question since it runs at the webserver, not at the webbrowser and thus impossibly can be the cause. JSP just produces a bunch of HTML as you develop it to do. – BalusC Commented Jun 7, 2010 at 17:43
Add a ment  | 

3 Answers 3

Reset to default 5

There may be some "scanners" around but none of them is going to do a decent, plete job - whether things behave well across browsers one will have to confirm visually, using human eyes.

The best you can do in terms of automatic testing, in my opinion, is create valid HTML. It won't guarantee proper rendering, but it's a first step into the direction and will save you from many problems.

You're not going to find such a tool unfortunately - if it existed, the person who made it would be able to pretty much charge whatever they liked for it and would be adored by web developers the world over!

In seriousness though, you can find tools such as W3C's HTML and CSS validators, but you will still have issues as different browsers do different things when presented with even the most valid standards-pliant markup. Valid markup does not mean it will look right, after all. You will often have problems with older browsers in this respect (read up on 'quirks mode' and 'standards mode').

Ensuring that the pages look the same in all browsers is quite hard, short of actually using each browser on each OS or platform you will not find a reliable way to do this automatically. I do believe that there are some tools out there to give you screenshots of a page loaded under various browsers, however I have heard they can be slow and aren't that brilliant.

As for JavaScript, all the browsers have their little quirks with it I have found. Even when using a framework such as jQuery or Prototype, you will still have issues which can only be found by trying the page out yourself and seeing if it does what you expect it to.

In essence, what I'm trying to say is that 'cross-browser support' is highly subjective and cannot be tested using an automated tool. Only you know what to expect from each page, which browsers are doing things 'right' and which ones aren't. This includes all aspects of the page, from HTML and CSS through to JavaScript.

I suspect that you really want a quick fix solution with minimal effort required, but you won't get it. You need to spend your own time and a lot of effort making sure your site looks and acts right across all the browsers you wish to support. No-one else will do it for you.

http://browsershots/ This websites uses different browsers and takes screenshots for you so will show you visually what it looks like for js i think you would have to actually test it.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1742258158a4410403.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信