Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

W3C validator and HTTPS

I'm currently having trouble with the W3C markup validation service https://validator.w3.org and the use of HTTPS. When I type in there the website address with https I get the following response:

Sorry! This document cannot be checked.

Together with an error 500 saying that it can't connect to the site. Also, on the website page I have one link which carries the person into the validation and shows the site has been validated. When clicking the link without HTTPS everything works, but with HTTPS I get one message

Sorry! This document cannot be checked. No Referer header found!

which I believe is because the secure connection doesn't send the referer header right?

Now, how can I use HTTPS and avoid these problems with the validation?

like image 967
user1620696 Avatar asked Sep 20 '15 02:09

user1620696


People also ask

What does the W3C validator do?

The Markup Validator is a free service by W3C that helps check the validity of Web documents. Most Web documents are written using markup languages, such as HTML or XHTML . These languages are defined by technical specifications, which usually include a machine-readable formal grammar (and vocabulary).

How is W3C Markup validation works?

Validation is comparing your code to W3C standards. The best way to validate your code is by using the W3C validation tools. This validator checks the markup validity of web documents in HTML, XHTML, SMIL, MathML, etc. This validator checks the CSS validity of web documents in HTML, XHTML etc.


1 Answers

Please always directly use https://validator.w3.org/nu/ (the current W3C HTML Checker) instead of https://validator.w3.org/ (the legacy W3C Markup Validator).

The HTML Checker is able to check documents at https URLS just fine. So If you find a https site that it doesn’t work with as expected, then that’s likely a bug I need to fix. (I maintain the checker, and recently updated it to get HTTPS support using HTTP Components HttpClient 4.4 —the latest Apache HTTP client library—including full support for HTTPS sites that use SNI.


A note about which W3C tool to use for checking HTML documents

On the W3C backend, when you use the https://validator.w3.org/ legacy Markup Validator to check documents with <!DOCTYPE html> doctypes, it just hands off the request to the same backend that directly drives the https://validator.w3.org/nu/ HTML Checker. But the HTML Checker has a UI with more features, and using it from https://validator.w3.org/nu/ is faster.

We (the W3C) plan to swap those two around eventually—that is, move the current HTML Checker to https://validator.w3.org/ and move the legacy Markup Validator to https://validator.w3.org/legacy/ or some such—but it will be a while yet before that happens. So in the mean time, as I said, I suggest always just doing all your HTML checking from the https://validator.w3.org/nu/ site.

like image 92
sideshowbarker Avatar answered Nov 08 '22 06:11

sideshowbarker