Rasmus <ras...@gmx.us> writes: > Hi, > > Kaushal Modi <kaushal.m...@gmail.com> writes: > >> Thanks for checking. The validator (the default one in org-html-postamble) >> never worked for me, probably because of something being blocked at work.. >> I get this when I click the validator link: >> >> ===== >> Sorry! This document cannot be checked. >> No Referer header found! >> >> You have requested we check the referring page, but your browser did not >> send the HTTP "Referer" header field. This can be for several reasons, but >> most commonly it is because your browser does not know about this header, >> has been configured not to send one, transferred the referring document >> over a secure protocol such as https but is accessing the validator over >> ordinary non-secure http, or is behind a proxy or firewall that strips it >> out of the request before it reaches us. >> >> This is not an error in the referring page! >> ===== > > There’s definitely some sort of issue... > > I guess this is for a local file? I guess it needs to be publicly > available. But it doesn’t seem to work all the time even for public > pages. > > Using the following example, it only works from the http version, not the > https version.
Https pages not working is a known "bug" cf. https://validator.w3.org/docs/help.html#faq-referer If a JS solution is OK, we could do something like this: <a href="http://validator.w3.org/check?uri=referer" onclick="this.href= 'https://validator.w3.org/check?uri='+encodeURIComponent(document.URL)"> Validate </a> This would work with public https pages if JS is supported. See: https://validator.w3.org/favelets.html https://lists.w3.org/Archives/Public/www-validator/2005Mar/0011.html I have not found a way to send the raw source code via an url for local files. Rasmus -- Dobbelt-A