2 ms·
if you need an absolute URI for any assets, then just use: //www.example.com/path/to/asset.js this will then use the same transport as the containing page use
by philjohn 14y ago
if you need an absolute URI for any assets, then just use:
//www.example.com/path/to/asset.js
this will then use the same transport as the containing page uses.
- paulsutter 14y agoThat's a great suggestion that's often overlooked. At Quantcast we tried to use "//" without the protocol in our tags (to eliminate the need for a separate http: and https: tag), but we had a huge number of complaints about a bug in our tag (missing http:!). Users also tried to be helpful and add in the "http:" and then complained when it broke. In the end we went with two separate tags to reduce the support burden, despite the added complexity of having to explain the two tags.