Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The site looks great. When I tried to add a site, the link for the js to be included was missing the scheme (http|https):

    <script src="//usecharm.com/xx.js" type="text/javascript"></script>
If we could have a restricted live demo, or a video to get a feel of how things work before needing to get some fair amount of data, that’d be even better.

Great job and good luck with it.

edit: apparently // is the way to go, see comments below.




Not including the http|https tells the browser to use the current page to figure out if the file should be loaded over http or https. Loading http content if you're on a https page will trigger non-secure content warnings with browsers


Thanks for the tip. I assumed we’d have to manually add the scheme to the url.


Yeah, the reason for that is that 1) if/when we add HTTPS support it will run seamlessly. For now it just returns a blank file if included over HTTPS, and so the page will degrade gracefully (no tracking) without any security errors that would've come up from loading an http resource. 2) it's shorter.

Though you're right it does look a bit weird, I will add a note to the instructions explaining what it is and that its not a bug or anything. Replacing it with http:// would've worked perfectly fine as well.

We use the same scheme to link to the media on our CDN so the app can switch seamlessly between http and https secured sections (account,billing) without any different <head> code


// is a protocol relative URL so it will work for both http and https


wow how long has this worked? I learn something new here every day.


Must have been around for a while as it works in IE6 as well




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: