views:

56

answers:

3

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

+5  A: 

There may be some "scanners" around but none of them is going to do a decent, complete 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.

Pekka
Precisely - I've had a problem with some ancient browser (IE6?), where the positioning code was executing correctly, DOM position properties were set, but the element in question was *displayed* completely elsewhere. I don't think anything less than a full AI could have "automatically" caught that.
Piskvor
A: 

http://browsershots.org/ 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.

Dean
+3  A: 

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-compliant 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.

Geoff Adams
ugh, this is kind of what I expected. I have not done much UI work in the past 3 years so I was looking for a quick way to make a legacy app work in multiple browsers. Oh well, looks like we got some work to do.
jranaudo