4 ms·
A perfect case study in why the current practice of "just add a script tag with 'facebook.com/whatever.js' into your page and all your LIKE buttons will work ma
by mxxx 14y ago
A perfect case study in why the current practice of "just add a script tag with 'facebook.com/whatever.js' into your page and all your LIKE buttons will work magically!" is an absolutely terrible idea.
- ceejayoz 14y agoYep. We prefer the <iframe> solution over their JavaScript-created versions for this reason.
- esrauch 14y agoThis particular bug is just as likely either way; the js must be changing window.location, there's no reason to think the iframe wouldn't change window.top.location.
- nwh 14y agoIE and Chrome both have ways of restricting iframes from changing window.top.location, but I wouldn't trust them to work. IE: <iframe src="http://example.com" security="restricted"></iframe> Chrome: <iframe src="http://example.com" sandbox></iframe>
- gfodor 14y agoIt's only a terrible idea if you don't have a kill switch. It's also only a terrible idea if the benefits do not outweigh the costs of something like this happening (and you being unable to respond to it.) Adding the JS file is simple and up until now has always worked. If it ends up driving tons of traffic back to your site it seems worth it.
- benihana 14y ago'Absolutely terrible' is a just a wee bit hyperbolic. It is an idea that has positives and negatives, but you only notice it when it does this. And how many times has it done this since they've implemented it?
- yogo 14y agoBroken behavior related to this happens quite often actually. I've had sites that were bitten by this or some variant. If you follow the Facebook bug tracker it comes up every now and then (it might be localized to a degree in some cases). They do move fast and I think fix it quickly in most cases. In fact there was something that was broken just last week here on HN but the behavior wasn't something that affected so many sites to this degree.