And that's a pretty mild example of what could happen if you did. Hotlinking javascript is an excellent way to allow someone else to pull all kinds of tricks with your visitors and your image. For example, redirecting all your traffic to a shocksite. Every time you include some externally hosted javascript you open yourself and your visitors to a security risk. And on top of that, if you do it like this you're steali…
The security risk is precisely why a lot of new services provide embeddable content via iframes now, rather than JS. On the other hand, this still isn't perfect - we wrote about it today, actually: https://www.tinfoilsecurity.com/blog/protect-your-website-fr...
You shouldn't hotlink someone else's JavaScript
61–70 of 102 posts
Re: You shouldn't hotlink someone else's JavaScript
#62Ok there is a better way to handle this than adding some html to a page to make a banner, posting to HN, and hoping for the best. Check for referal headers and throw a 301.
Or just send the owner an email: http://www.whois.com/whois/whatispolymath.com
Re: You shouldn't hotlink someone else's JavaScript
#63Earlier quoted context omitted.
The security risk is precisely why a lot of new services provide embeddable content via iframes now, rather than JS. On the other hand, this still isn't perfect - we wrote about it today, actually: https://www.tinfoilsecurity.com/blog/protect-your-website-fr...
As long as you host the JavaScript yourself this shouldn't be a problem. Why would it? Iframes suck.
Re: You shouldn't hotlink someone else's JavaScript
#64http://blog.sucuri.net/2013/05/who-really-owns-your-website-...
thanks,
Re: You shouldn't hotlink someone else's JavaScript
#65Screenshot for potential future confused HNers when Polymath realizes it and uses a real CDN: http://i.imgur.com/A8JzHtK.png
It hit me that the submission was to a demonstration rather than an article, so I temporarily instructed Noscript to allow all domains used by the page. Sure enough, now the banner appeared.
But that speaks to another reason to not use too many scripts hosted by third-parties. It makes for a very cluttered list of domains for users of Noscript and similar to authorize. I just leave sites that have more than a small number. How many third-party analytics, tracking, tools, social sharing, voting, polling, comments, shopping, deals, and other tools do you really need to embed to make a web site these days?
I love when the list is just domain.foo and domain-static.foo and maybe google-analytics or another mainstream analytics domain.
Re: You shouldn't hotlink someone else's JavaScript
#66Earlier quoted context omitted.
They specifically ask people not to do that.
Also, linking to something as possibly unstable as a master branch seems odd at best.
Re: You shouldn't hotlink someone else's JavaScript
#67We changed to pics of Male Enhancement devices and medication and shared with other car forums, we all watched for days and the guy was pretty clueless on what was going on and apparently didn’t check his ads as often as he should.
We even had a vote for what pic appears today poll.
Remember: The first rule of Changing hot linked photos club is to never talk about changing hot linked photos.
Re: You shouldn't hotlink someone else's JavaScript
#68Re: You shouldn't hotlink someone else's JavaScript
#69Re: You shouldn't hotlink someone else's JavaScript
#70A car dealer was hot linking to pictures of our cars from a sports car forum I belong to and using them to sell his same models on eBay. We changed to pics of Male Enhancement devices and medication and shared with other car forums, we all watched for days and the guy was pretty clueless on what was going on and apparently didn’t check his ads as often as he should. We even had a vote for what pic appears today poll.…
Fortunately, my company's IT department had enough of a clue that when I explained what had happened, they agreed it was possible; it was a tense week, though, while they investigated.
I'm not saying the sort of reaction in parent isn't always appropriate, but just be aware that people's lives can be ruined to save a few dollars. I think the OP's solution is ideal: it alerts people to the problem in a very professional way, and provides solutions for the most common cases.