+1!
You shouldn't hotlink someone else's JavaScript
21–30 of 102 posts
Re: You shouldn't hotlink someone else's JavaScript
#22Ok 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.
Well, I see it as a great reminder why one shouldn't trust scripts hosted elsewhere into one's site.
Re: You shouldn't hotlink someone else's JavaScript
#23Ok 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.
Re: You shouldn't hotlink someone else's JavaScript
#24Find more here: https://www.google.com.au/search?q=%22http%3A%2F%2Fgsgd.co.u...
Re: You shouldn't hotlink someone else's JavaScript
#25Re: You shouldn't hotlink someone else's JavaScript
#26Ok 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.
But if you do that you have to configure your server for it, and your server still has to handle the request. The file is 2KB gzipped; Serving the file or a redirection is basically the same thing.
Re: You shouldn't hotlink someone else's JavaScript
#27Re: You shouldn't hotlink someone else's JavaScript
#28Earlier quoted context omitted.
I hope referrals will be disabled anytime soon. Firefox has AFAIK disable referrals to other domains by default.
In the case of Javascript hotlinking, that'll do approximately diddly squat though. if(/whatispolymath/.exec(location.href)) alert("...");
Re: You shouldn't hotlink someone else's JavaScript
#29And 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…
That way, you can run them through the ol' asset pipeline too... minifiers and possibly serve them straight from gzips.
Gotta always remind ppl of https://developers.google.com/speed/ ... the OP scores 47 (out of 100)
Re: You shouldn't hotlink someone else's JavaScript
#30the classic: "it worked yesterday..."
so i checked the code and all js,css files where used from a git repo from some other guy. who moved all files away in other directories.
was easy to fix, but i have no idea how stupid his coder is to use github urls from other people repos!!