This may be a dumb newbie question, so appologies for that.
My website is using a SSL certificate. I also include the W3 validator link in each of my webpages as follows:
<a href="http://validator.w3.org/check?uri=referer"><img src="valid-xhtml1.png" alt="Valid XHTML 1.0 Strict" height="31" width="88" /></a>
(Note: copied over the w3 validator image so SSL wouldn’t complain about unsecure resources).
When I do this, and click on the image to validate the page, I get this message from the validator:

The error mentions requesting the validator unsecurely. So I tried changing the href of the <a> tag to use https for the validator, but then the page simply doesn’t load (I guess because the validator doesn’t use SSL).
Does anyone know a way around this? I am guessing there is not a way to use the code as is, but maybe there is a way to update uri=referer to be uri=https://mysite.com/...? Is there a way to dynamically grab the URL of the current page?
Also, just for further reference, does SSL simply prevent the referer request header from being accessed?
Oh, and I know I can just go to my website using http instead of https, and the validator works. But I’d rather get it configured to work with https too.
Ok, so it’s not looking like there is a way to do this with just HTML. So instead, I decided to use JavaScript to handle the issue.
I removed the
<a>tag from around the W3 logo and added anonclickJavaScript functionvalidatePage(). So here is basically a template for an XHTML Strict page that still allows you to include the validation icon.Notice how the
validatorUrlvariable trims off the “https” from the URL and instead uses “http”. So I just circumvented using the HTTP referer header.Hope this helps someone else.