2 ms·
> The answer is always "that's not reliable, you can't really use it for this". Only if the question is "Is window.onbeforeunload reliable to track online/offl
by ratww 7y ago
> The answer is always "that's not reliable, you can't really use it for this".
Only if the question is "Is window.onbeforeunload reliable to track online/offline users?"
In every other case, that should be a disclaimer on top of an answer to the actual question.
Maybe future users don't need 100% reliability for some reason. Maybe they're just trying to find out if something like onbeforeunload even exists.
Sure, showing better ways is fine. As long as there is an actual answer somewhere (preferably with the disclaimer), instead of cute but condescending non-answers like [1].
[1] https://stackoverflow.com/a/1732454 https://stackoverflow.com/a/1732454
- ceejayoz 7y ago> Only if the question is "Is window.onbeforeunload reliable to track online/offline users?" We're gonna have to disagree on this. That's like me asking "how do I get to this restaurant", and you give me directions to the place that burned down a year ago without mentioning that. Useless, and infuriating when I drive a half hour to discover it.
- ratww 7y agoI know it's impolite to say that here, but if you actually read the rest of my reply, you'd see that in my opinion the best answer for a Q&A site would be "The restaurant burned a year ago, but it was at 450, Blahblah street". Maybe I didn't make it clear enough before, but I am saying it now. Consider that the asker might just using the restaurant as a reference to some other place. Or someone "hearing" the answer in the future wanted to know the address to visit the ruins. The information might still be useful. Consider that you might not always know better. If this were a chatroom or forum, fine, answer informally. But we're talking in the context of a Q&A webiste.
- ceejayoz 7y agoThe most likely answer the OP in that scenario needs is "it burned down". If they want to visit the ruins, they can easily say so in the comments and likely get an updated answer (or they can mention it in the original question; perhaps they'll think to do it the next time around when they've got an unusual requirement).