6 ms·
Ok 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
by geuis 13y ago
Ok 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.
- fosap 13y agoI hope referrals will be disabled anytime soon. Firefox has AFAIK disable referrals to other domains by default.
- akx 13y agoIn the case of Javascript hotlinking, that'll do approximately diddly squat though. if(/whatispolymath/.exec(location.href)) alert("...");
- martin-adams 13y agoOr better yet, test if it's not your domain, then show a message.
- fosap 13y agoThat is a way better, IMO.
- andymcsherry 13y agoOr just send the owner an email: http://www.whois.com/whois/whatispolymath.com http://www.whois.com/whois/whatispolymath.com
- bigiain 13y agoSo why should it be the responsibility of some guy who's bandwidth is getting stolen to be nice about notifying the guy who's stealing it - why didn't the site owner feel any obligation to send the .js hosting site owner an email asking if it was OK first?
- jacquesm 13y agoCompared to what could have happened this is actually pretty mild.
- marshray 13y agoEveryone these days is so polite. OK, that was a bit of an exaggeration. But back in my day the web had a whole site high-bandwidth site specifically for educating careless webmasters about the dangers of hotlinking: g o a t s e . c x. It was used to great effect on things like auction sites where the original page html was not allowed to be changed after listing.
- jacquesm 13y agoThat was exactly what I had in mind when I wrote that.
- nevvvermind 13y agoI once hotlinked an image posted on a forum, and they served the same link you provided. I never did a hotlink again.
- Trufa 13y agoThere was a post on reddit to a site that had hotlinked an image for it's background who suddenly found itself with a pornographic background.
- readme 13y agoI'm not sure if politeness is the motivator. Imagine if you had done that, for all hotlinks to your script. Then, it turns out a children's website is hotlinking your script. Some idiot at Company X decides that it's actually your fault, since its your script that did it. To save face, they get an expensive lawyer to sue you. Next thing you know, you're a registered sex offender.
- h0w412d 13y ago
- maaaats 13y agoWell, I see it as a great reminder why one shouldn't trust scripts hosted elsewhere into one's site.
- tankenmate 13y agoIndeed, it's the funniest public sevice announcement I have seen in a while.
- UnoriginalGuy 13y agoI use Google and I'm comfortable with that. The nice part about using Google is first off it offers speed advantages (as most people will have Google's JQuery lib cached already), secondly I don't expect Google to get hacked, and lastly we have Google's permission to do exactly that.
- nly 13y agoSo, do you think your visitors have a problem with Google knowing about every visit to your site?
- UnoriginalGuy 13y agoIt is specifically mentioned in our privacy policy. We also use Google Analytics, so that ship has sailed.
- PommeDeTerre 13y agoNonsense. Users can very likely block Google Analytics on your site with ease, and without impacting the rest of your site's functionality. That's not necessarily the case when more critical content is served from Google's servers. Regardless of what your privacy policy states, the responsible thing to do is to at least give your users the option of opting out of such tracking by third-parties, all while still leaving your site usable.
- 13y ago
- Yver 13y agoBut 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.
- babuskov 13y agoMaybe it would be better to reply with 403 instead?
- chrischen 13y agoPolymath might not be the only ones hotlinking... the alternative would be to track everyone who is hotlinking, get their email, and then notify them. Many will likely ignore this email.
- Trufa 13y agoI had this exact same thing happen last week in one of my wordpress site, I had just inserted that script when developing to try it out and forgot to change it for a local file or a CDN afterwards. As someone affected by this, I learned my lesson, but I was very happy about how the hotlinking was handled, I was a clear impossible to miss warning, with a clear and easy solution, I though it was only fair.