This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
It would be nice to have favicons to indicate the status of a validation. As an example of usage, I often validate multiple pages at a time. In Firefox I have these open as multiple tabs, each with their own icon. It'd be good to be able to scan along the list of tabs and immediately see any pages that haven't validated. I was thinking something as simple as a red square (invalid) or a green square (valid) would work, but ticks and crosses would do equally well. Adding favicons is relatively easy - just add two link elements to the head of the results template (one for minority browsers, one for IE): <link rel="icon" href="http://example.com/favicon.ico" /> <link rel="shortcut icon" href="http://example.com/favicon.ico" />
(forgot to mention, I'll have a go at writing a patch for this later)
Just noticed this is pretty much a dupe of bug 950 - I didn't find it originally because it was set to the CSS validator component. I'll leave it up to someone else to dupe if they feel necessary. Henrik, I've copied you in on this anyway as it seems like you'd be interested. My patch just adds an extra section into header.tmpl that reuses the valid/invalid switch from result.tmpl. If this is totally the wrong approach then let me know, as I don't have an install of validator here so haven't tested it. I've just attached the whole replacement file as I'm not sure how to use diff in a way that gives useful results. This is my first patch to an open source project so bear with me :) Incidentally I've been editing the file from the 0.7.1 tarball - if you want me to pull from CVS and redo the edits let me know. I've also attached a couple of simple favicons in the valid/invalid colours. According to Wikipedia ( http://en.wikipedia.org/wiki/Favicon ) image/vnd.microsoft.icon is the correct MIME type for .ico files so I've added that hint to the patch.
Created attachment 401 [details] Revised header.tmpl file with favicon support, 1st attempt
Created attachment 402 [details] favicon for valid state
Created attachment 403 [details] favicon for invalid state
Created attachment 404 [details] 2nd (and hopefully final) version Minor cleanup on the output HTML, and this time tested on a local install.
Created attachment 405 [details] Alternative version with data URLs People on #validator wanted to see a version with data URLs because of caching concerns. Because data URLs don't work with IE I removed it's rel="shortcut icon" syntax as well.
Tested in Firefox 1.5.0.1, Safari 2.0.3, and Opera 9PR. The normal 'ico' version works fine in all the browsers (although Safari doesn't show icons on the tabs as per usual). The alternative 'data url' version works fine in Firefox and Safari (with the usual caveats) but fails in Opera. This might be to do with my use of PNGs, so I'll put together an 'ico' version of the data URL page later to check.
why not: <link rel="icon" href="data:image/png,<TMPL_IF NAME="VALID">%89PNG%0Dblabla<TMPL_ELSE>%89PNG%0Dblabla</TMPL_IF>" type="image/png" /> ? so that we dont have duplicate "<link rel" stuff
Because we'd then have invalid PNGs for some results?
Created attachment 409 [details] Revised according to Henrik's comment - seems to work fine Björn - are there any results that aren't valid (or tentatively valid) or fail?
What I am saying is that I don't see anything in the PNG specification that allows for zero-length PNG data, so "data:image/png," is an invalid PNG, and the Validator should not generate invalid PNGs.
That's true, but can we ever get to that state - i.e. is results ever generated with the result being neither valid nor invalid?
Note that comment 9 contains a <TMPL_ELSE> branch, so the result can't be empty.
what is needed here before we cant get a commit? actually this should have made a dupe of bug 950
*** Bug 950 has been marked as a duplicate of this bug. ***
While we're at it we should also change the document title. this: <title><TMPL_IF NAME="page_title_url">Result for <TMPL_VAR NAME="page_title_url" ESCAPE="HTML"><TMPL_ELSE><TMPL_IF NAME="page_title"><TMPL_VAR NAME="page_title" ESCAPE="HTML"><TMPL_ELSE>Validation Results</TMPL_IF></TMPL_IF> - W3C Markup Validator</title> should changed to: <title><TMPL_IF NAME="page_title_url">Result for <TMPL_VAR NAME="page_title_url" ESCAPE="HTML"><TMPL_ELSE><TMPL_IF NAME="page_title"><TMPL_VAR NAME="page_title" ESCAPE="HTML"><TMPL_ELSE>Validation Results</TMPL_IF></TMPL_IF> - <TMPL_IF NAME="VALID">Valid<TMPL_ELSE>Invalid</TMPL_IF> - W3C Markup Validator</title>
I would have originally done all this in bug #950 but it was for the CSS Validator so I opened a new bug. Agreed about the title - I'll add your code later.
Changing the document title would result in undesirable behaviour when bookmarking a validation result page, don't you think?
That's a good point, and probably enough to not bother adding this. Favicons get bookmarked as well in Firefox at least, but they update if they've changed when you visit a site (which is what we'd want in this case).
So yeah, as Henrik said in comment #15, what is needed to get this checked in? Is it even wanted in the system? Fair enough if it isn't of course, but a 'yes' or 'no' would be nice :)
Robin, your message in www-validator [1] did not show a lot of buy-in, and there were discussions here on fine implementation points, so I let some time pass. Are all the issues (raised here at least) now resolved, and all reasonably happy (Bjoern, any objection?) If so, I will commit the patches to the development codebase this week. Future beta test should show if users give this a thumbs up, down, or just don't care. [1] http://lists.w3.org/Archives/Public/www-validator/2006Feb/0009
I don't have any serious blockers atm.
Thanks Olivier. At the moment the 'patches' aren't really patches, just my version of the header.tmpl file. I couldn't get my version of patch (the one that comes with MacOS 10.4) to produce a patch that looked like any of the others I've seen. If you want me to spend some more time looking into getting a proper patch then let me know; otherwise I'll assume you're happy with how it is currently. Thanks!
Oops, just re-read #22 and realised what you were saying. Yes, I'm happy with my current file (attachment #409 [details]), and I think this satisfies Henrik's wishes as well.
Implemented in CVS, see: http://lists.w3.org/Archives/Public/www-validator-cvs/2007Mar/0062 http://lists.w3.org/Archives/Public/www-validator-cvs/2007Mar/0063 Thanks a lot, Robin, Henrik and all.
For what it's worth, at some point between the Opera 8.something I originally tested this on and Opera 9.20 which I've just checked in, data URLs for favicons started working. So it's just IE that's lagging from the major desktop browsers.