3 ms·
The example says ...action="//... shouldn't this be ...action="http:// http:// ... ? This is so seemingly simple but so useful, thanks a lot! EDIT thanks for
by namenotrequired 13y ago
The example says ...action="//... shouldn't this be ...action="http:// http:// ... ?
This is so seemingly simple but so useful, thanks a lot!
EDIT thanks for explaining, all! :)
- callmevlad 13y agoIt's a protocol-relative URL, which inherits the protocol of the parent page. http://www.paulirish.com/2010/the-protocol-relative-url/ http://www.paulirish.com/2010/the-protocol-relative-url/
- jmvoodoo 13y agoBy removing the scheme from the url, the browser will use http/https based on the scheme of the containing page.
- deleted 13y ago[deleted]
- rubiquity 13y agoThat's known as protocol relative URLs. That way if your static page is HTTPS the form action will be the right protocol.
- deleted 13y ago[deleted]
- junto 13y agohttp://benpowell.org/https-and-http-the-protocol-less-or-protocol-relative-urls/ http://benpowell.org/https-and-http-the-protocol-less-or-pro...
- MrQuincle 13y agoAh, I had the opposite remark: On http://www.formspree.com/ http://www.formspree.com/ at section 1, they say to use "http://api.formspree.com/your@email.com" http://api.formspree.com/your@email.com" while it should be "//api.formspree.com/your@email.com". I just set up a Jekyll site with links to youtube and disqus. Quite important or it won't work.
- namenotrequired 13y agoThat's what confused me, too, the inconsistency between the two.