IOS devices (iPods, iPads, iPhones) have no JavaScript debugger



  • @Kittemon said:

    It's relevant because blakey himself said that the very thing he was attempting to do probably would not work (because it's a stupid thing to do, and any sensible person would expect a browser to disallow it). Yet he attempted to do it anyway, then posted a blakeyrant because he had no way to debug what he was doing when it did, as expected, fail to work. I pointed out his apparent cognitive disconnect earlier on in the thread, on the assumption that he wouldn't have posted this particular blakeyrant if he hadn't been so driven to try something that he figured would not work even before he tried it. Did you read that part of the thread?

    The WTF is that Mobile Safari does not have a Javascript debugger, not that the browser blocks questionable behavior, which I thought was abundantly clear. Blakey himself has repeatedly stated that what he is doing is messy and he would prefer the browsers to implement a proper feature to make web analytics easier. Also, because the web is such a shitty platform, we are frequently reduced to doing stupid things to get the software to work. Welcome to web development, kid.

    @Kittemon said:

    Actually, what he said was more along the lines of "ZOMG YOU ARE ALL IDIOTS WHY DIDN'T YOU THINK TO READ THIS THREAD FRIST". We're talking about blakeyrat after all.

    Which, as I pointed out, I don't think was very sensible of him. However, he wasn't responding to you, he was responding to someone else. By the time you chimed in with your unworkable suggestion, his comment had already been up for 7 hours.

    @Kittemon said:

    I was merely adding a bit of humor to something that was no longer relevant to anyone. Blakeyrat doesn't come here for answers anyway, he comes here for humor; so, I don't see the problem.

    So the humor is dogpiling on Blakey for doing something he already stated he can't do? Oh, ha ha. I get it.

    @Kittemon said:

    @morbiuswilters said:
    So my conclusion is either: 1) you did not read the thread; or 2) you are an idiot. I went for #1 because I'm a nice guy.

    False dilemma. Also, you are a liar.

    I guess a third option exists: you are trolling. But I find it annoying when people accuse others of trolling; it's real crybaby stuff. I'm not sure how not calling you a troll makes me a liar, though.



  • @blakeyrat said:

    @Kittemon said:
    It's relevant because blakey himself said that the very thing he was attempting to do probably would not work (because it's a stupid thing to do, and any sensible person would expect a browser to disallow it).

    No, I said an async HTTP request would be stupid and disallowed. That's not what I'm trying to do.

    @Kittemon said:

    Yet he attempted to do it anyway, then posted a blakeyrant because he had no way to debug what he was doing when it did, as expected, fail to work.

    I am trying to send a synchronous HTTP request (actually an image request), not an async XmlHttpRequest. Do you not understand the difference?

    There's no reason for those to be cancelled by the browser, because they do not (normally) slow the browsing experience for the user. The reason the request is cancelled is because of the way the browsers have implemented their unload... basically they dispose all the connections related to the last page before beginning the next, instead of letting the connections complete on their own. And as I pointed out in this thread, that is a reasonable and right design decision in most use-cases except mine-- in which case it would be nice to have another command or a XmlHttpRequest flag to be able to hint to the browser that I need the connection to remain open, despite page unload.

    @Kittemon said:

    By the time I chimed in, I had already established in a previous comment that blakeyrat was well aware that what he was trying to accomplish was stupid.

    You're either too stupid to know the difference between an async HTTP request and a synchronous HTTP request (even after I pointed it out in this very thread), or you're the one lying here.

    EDIT: Not only did I point it out in this thread, I addressed it specifically to you, Kittemon! Still going to try and claim you read the thread completely?

    Forget it, Blake(y). It's Kittemontown.



  • @blakeyrat said:

    I am trying to send a synchronous HTTP request (actually an image request), not an async XmlHttpRequest. Do you not understand the difference?

    You're trying to initiate a new connection during BeforeUnload. AFAICT the nature of the connection should be irrelevant.

    @blakeyrat said:

    There's no reason for those to be cancelled by the browser, because they do not (normally) slow the browsing experience for the user. The reason the request is cancelled is because of the way the browsers have implemented their unload... basically they dispose all the connections related to the last page before beginning the next, instead of letting the connections complete on their own. And as I pointed out in this thread, that is a reasonable and right design decision in most use-cases except mine-- in which case it would be nice to have another command or a XmlHttpRequest flag to be able to hint to the browser that I need the connection to remain open, despite page unload.

    Sure, let's come up with a standard for a brand new XSS attack vector that all browsers must implement, so that we can have web analytics which are slightly more precise, but which are not significantly more meaningful.

    @blakeyrat said:

    You're either too stupid to know the difference between an async HTTP request and a synchronous HTTP request

    hurrrrr... durr?

    @blakeyrat said:

    or you're the one lying here.

    By removing my comment and its context, you've managed to fail spectacularly at comprehending what I wrote. Congratulations, you're up to par.

    @blakeyrat said:

    Still going to try and claim you read the thread completely?

    Yes. I simply don't think the distinction between sync and async should hold any relevance to the actual issue, in theory. As you've found, it doesn't seem to hold any relevance to the actual issue, in practice.



  • @Kittemon said:

    @blakeyrat said:
    I am trying to send a synchronous HTTP request (actually an image request), not an async XmlHttpRequest. Do you not understand the difference?

    You're trying to initiate a new connection during BeforeUnload. AFAICT the nature of the connection should be irrelevant.

    Ok, so you're not stupid, you're just wrong.

    @Kittemon said:

    Sure, let's come up with a standard for a brand new XSS attack vector that all browsers must implement,

    What new XSS attack vector? Explain.

    @Kittemon said:

    Yes. I simply don't think the distinction between sync and async should hold any relevance to the actual issue, in theory.

    The point of closing connections during UNLOAD is so the browser can get on with loading the new page as quickly as possible without delaying the user. An async request delays the user, so it's the kind of thing the browser should be aborting. A synchronous request doesn't and so shouldn't. That it does now is only a side-effect of how a browser, technically, disposes of a page.

    @Kittemon said:

    As you've found, it doesn't seem to hold any relevance to the actual issue, in practice.

    Hard to say, since I've never tried using an async request because that would be terrible code and make my product a terrible product. For all I know, though, that works 100% of the time. Or 0% of the time. The only hint I have that it works is that stupid fake-o JS debugger uses it, which implies it works in WebKit... but I haven't used that either, so I simply do not know.

    So no, I haven't "found out." As you'd know if you bothered to read anything I've typed here. You dumbshit.



  • @morbiuswilters said:

    The WTF is blakeyrants. Another WTF is that Mobile Safari does not have a Javascript debugger, not that the browser blocks questionable behavior, which I thought was abundantly clear. Blakey himself has repeatedly stated that what he is doing is messy and he would prefer the browsers to implement a proper feature to make web analytics easier. Also, because the web is such a shitty platform, we are frequently reduced to doing stupid things to get the software to work. Welcome to web development, kid.

    Thanks, Mom. Also, FTFY.

    @morbiuswilters said:

    @Kittemon said:
    Actually, what he said was more along the lines of "ZOMG YOU ARE ALL IDIOTS WHY DIDN'T YOU THINK TO READ THIS THREAD FRIST". We're talking about blakeyrat after all.

    Which, as I pointed out, I don't think was very sensible of him. However, he wasn't responding to you, he was responding to someone else.

    It's a forum. He was responding to everyone who gives enough of a crap to bother reading it.

    @morbiuswilters said:

    By the time you chimed in with your unworkable suggestion, his comment had already been up for 7 hours.

    You just said that. I already responded to that.

    @morbiuswilters said:

    @Kittemon said:
    I was merely adding a bit of humor to something that was no longer relevant to anyone. Blakeyrat doesn't come here for answers anyway, he comes here for humor; so, I don't see the problem.

    So the humor is dogpiling on Blakey for doing something he already stated he can't do? Oh, ha ha. I get it.

    No, the humor was in replacing the poor horse that had already been flogged to death with a neon pink elephant that was still very much alive and rather annoyed at being flogged.

    @Kittemon said:

    @morbiuswilters said:
    So my conclusion is either: 1) you did not read the thread; or 2) you are an idiot. I went for #1 because I'm a nice guy.

    False dilemma. Also, you are a liar.

    OTFY

    @morbiuswilters said:

    I guess a third option exists: you are trolling. But I find it annoying when people accuse others of trolling; it's real crybaby stuff.

    Yet here you go...

    @morbiuswilters said:

    I'm not sure how not calling you a troll makes me a liar, though.

    +1, subtlety


  • ♿ (Parody)

    @blakeyrat said:

    The point of closing connections during UNLOAD is so the browser can get on with loading the new page as quickly as possible without delaying the user. An async request delays the user, so it's the kind of thing the browser should be aborting. A synchronous request doesn't and so shouldn't. That it does now is only a side-effect of how a browser, technically, disposes of a page.

    Is this true? I haven't worked in this area much (browser events, sending js requests, network protocol details, etc), but this seems to get synchronous vs asynchronous backwards, to my mind.



  • @boomzilla said:

    Is this true? I haven't worked in this area much (browser events, sending js requests, network protocol details, etc), but this seems to get synchronous vs asynchronous backwards, to my mind.

    I might have gotten them backwards, confusing everything and everybody. That terminology never gelled with me, and I have more than a little dyslexia when it comes to this kind of stuff.

    "The one that pauses JS execution until the HTTP request is finished" is the one I haven't used and never will. "The one that didn't pause JS execution" is the only sane option.



  • @Kittemon said:

    @morbiuswilters said:
    The WTF is blakeyrants. Another WTF is that Mobile Safari does not have a Javascript debugger, not that the browser blocks questionable behavior, which I thought was abundantly clear. Blakey himself has repeatedly stated that what he is doing is messy and he would prefer the browsers to implement a proper feature to make web analytics easier. Also, because the web is such a shitty platform, we are frequently reduced to doing stupid things to get the software to work. Welcome to web development, kid.

    Thanks, Mom. Also, FTFY.

    @morbiuswilters said:

    @Kittemon said:
    Actually, what he said was more along the lines of "ZOMG YOU ARE ALL IDIOTS WHY DIDN'T YOU THINK TO READ THIS THREAD FRIST". We're talking about blakeyrat after all.

    Which, as I pointed out, I don't think was very sensible of him. However, he wasn't responding to you, he was responding to someone else.

    It's a forum. He was responding to everyone who gives enough of a crap to bother reading it.

    @morbiuswilters said:

    By the time you chimed in with your unworkable suggestion, his comment had already been up for 7 hours.

    You just said that. I already responded to that.

    @morbiuswilters said:

    @Kittemon said:
    I was merely adding a bit of humor to something that was no longer relevant to anyone. Blakeyrat doesn't come here for answers anyway, he comes here for humor; so, I don't see the problem.

    So the humor is dogpiling on Blakey for doing something he already stated he can't do? Oh, ha ha. I get it.

    No, the humor was in replacing the poor horse that had already been flogged to death with a neon pink elephant that was still very much alive and rather annoyed at being flogged.

    @Kittemon said:

    @morbiuswilters said:
    So my conclusion is either: 1) you did not read the thread; or 2) you are an idiot. I went for #1 because I'm a nice guy.

    False dilemma. Also, you are a liar.

    OTFY

    @morbiuswilters said:

    I guess a third option exists: you are trolling. But I find it annoying when people accuse others of trolling; it's real crybaby stuff.

    Yet here you go...

    @morbiuswilters said:

    I'm not sure how not calling you a troll makes me a liar, though.

    +1, subtlety

    If I send you money for a plane ticket, will you come here so I can punch you repeatedly until you shut up?


  • @morbiuswilters said:

    @Kittemon said:
    It's relevant because blakey himself said that the very thing he was attempting to do probably would not work (because it's a stupid thing to do, and any sensible person would expect a browser to disallow it). Yet he attempted to do it anyway, then posted a blakeyrant because he had no way to debug what he was doing when it did, as expected, fail to work. I pointed out his apparent cognitive disconnect earlier on in the thread, on the assumption that he wouldn't have posted this particular blakeyrant if he hadn't been so driven to try something that he figured would not work even before he tried it. Did you read that part of the thread?

    The WTF is that Mobile Safari does not have a Javascript debugger, not that the browser blocks questionable behavior, which I thought was abundantly clear. Blakey himself has repeatedly stated that what he is doing is messy and he would prefer the browsers to implement a proper feature to make web analytics easier. Also, because the web is such a shitty platform, we are frequently reduced to doing stupid things to get the software to work. Welcome to web development, kid.

    The Meta-WTF, however, is that Blakey is trying to do something that is broken by design and, as is inevitable, it is failing, and rather than admitting that the problem is in the design, he is sublimating that cognitive dissonance into feelings of rage at a side-issue.  I have found this amusing to watch.



  • @blakeyrat said:

    The point of closing connections during UNLOAD is so the browser can get on with loading the new page as quickly as possible without delaying the user. An async request delays the user, so it's the kind of thing the browser should be aborting. A synchronous request doesn't and so shouldn't. That it does now is only a side-effect of how a browser, technically, disposes of a page.

    I disagree.  The reason the browser closes the connections during unload is because IT'S NOT *YOUR* BROWSER.  It belongs to the end user and exists solely to serve their interests, not yours.  If they say "stop what you're doing and go do something else", that's what the browser should do.  Not "Oh, hang on, this other guy wants me to do something first".  What's that?  You're a special case, you say?  Yeah, I heard that before.  That's what the all say when they want to launch a pop-up when you close their site.

    Not.  Your.  Browser.  Deal with it.



  • @DaveK said:

    I disagree. The reason the browser closes the connections during unload is because IT'S NOT YOUR BROWSER. If they say "stop what you're doing and go do something else", that's what the browser should do.

    I agree. I don't know what kind of crazy straw man you're trying to create here, but have I ever said otherwise? Quote me. I dare you.

    @DaveK said:

    Not "Oh, hang on, this other guy wants me to do something first".

    This might shock you, but as it turns out, modern computers can do more than one thing at a time. "Load my analytics pixel" and "load a new webpage" are not mutually-exclusive. (Rather, they should not be mutually-exclusive. The only reason they are mutually-exclusive now is due to a side-effect of how pages are unloaded combined with a general lack of interest on the part of browser makers to support web analytics.)

    Moreover, since my only alternative in this case is to artificially delay the new page load, it doesn't benefit anybody to make loading an analytics pixel in the BEFOREUNLOAD handler impossible. It doesn't help me. It doesn't help the user. It's harmful all-around.

    @DaveK said:

    What's that? You're a special case, you say?

    No, I'm not. Virtually every website worth money has analytics code of some sort installed. The W3C may consider it a "special case", but then again they consider having text in columns a special case, so they're obviously off their rocker and don't know shit about the web as she is spoke.

    @DaveK said:

    That's what the all say when they want to launch a pop-up when you close their site.

    Launching a pop-up is obviously disruptive. I'm not buying your slippery slope bullshit.



  • @DaveK said:

    You're a special case, you say? 
    To reiterate what Blakey said - well, to iterate it, anyway - analytics genuinely is a special case. In its way it's every bit as vital to the web as we know it as, say, HTTP. I think a lot of people don't realise that analytics are absolutely vital in persuading businesses to invest in creating content for the web. The more accurately you can quantise the return, the easier it is to persuade people to put money into something online.



  • @blakeyrat said:

    The W3C may consider it a "special case", but then again they consider having text in columns a special case, so they're obviously off their rocker and don't know shit about the web as she is spoke.
    The W3C consider actual practical implementation of theory to be a special case. Bear in mind that they seem you much the same way a particularly elitist pure mathematician sees a bookkeeper.


  • ♿ (Parody)

    @DaveK said:

    The reason the browser closes the connections during unload is because IT'S NOT YOUR BROWSER.

    Again, without much network knowledge, what's going on here? Does this mean the the browser is closing the connection before the beforeunload event?

    It seems to me that if the connection is still open during the event, and js is allowed to send stuff, once it gets sent, the browser can't really cancel that, can it? Since any cancellation would be coming behind the original packets, right? So it would seem to me that the browser has either already closed any connection to the server, or doesn't allow anything to go out during this event.

    So it would seem like the most iron clad way to deal with this is to use the previously mentioned redirection. I can see how this could be difficult to integrate 3rd party analytics software with arbitrary web apps.



  • @boomzilla said:

    So it would seem like the most iron clad way to deal with this is to use the previously mentioned redirection. I can see how this could be difficult to integrate 3rd party analytics software with arbitrary web apps.

    What the fuck is wrong with you.


  • ♿ (Parody)

    @blakeyrat said:

    @boomzilla said:
    So it would seem like the most iron clad way to deal with this is to use the previously mentioned redirection. I can see how this could be difficult to integrate 3rd party analytics software with arbitrary web apps.

    What the fuck is wrong with you.

    I have really bad seasonal allergies, and I've started allergy shots again, so hopefully that will get under control soon. I'm touched by your apparent concern, but somehow I suspect your motives. WTF are you really talking about?



  • @blakeyrat said:

    The point of closing connections during UNLOAD is so the browser can get on with loading the new page as quickly as possible without delaying the user. An async request delays the user, so it's the kind of thing the browser should be aborting. A synchronous request doesn't and so shouldn't. That it does now is only a side-effect of how a browser, technically, disposes of a page.

    Loading a new page is completely beside the point. The key concept is that the WWW is (and has always been) stateless. A single page, along with any embedded or explicitly associated resources, form a context that is considered to be a single entity, which exists in a vacuum. Any open connections are also resources associated with the current context; as such, they should be disposed of along with everything else when the page is unloaded. Similarly, it makes no sense whatsoever to open a new connection during BeforeUnload, as that would load a completely new resource into the current context, just as the browser has begun the process of disposing of the context. Whether your request is synchronous or asynchronous is a red herring.

    @blakeyrat said:

    Hard to say, since I've never tried using an async request because that would be terrible code and make my product a terrible product. For all I know, though, that works 100% of the time. Or 0% of the time. The only hint I have that it works is that stupid fake-o JS debugger uses it, which implies it works in WebKit... but I haven't used that either, so I simply do not know.

    So no, I haven't "found out." As you'd know if you bothered to read anything I've typed here.

    I bothered to read this:

    @blakeyrat said:
    The reason the request is cancelled is because of the way the browsers have implemented their unload... basically they dispose all the connections related to the last page before beginning the next, instead of letting the connections complete on their own. And as I pointed out in this thread, that is a reasonable and right design decision in most use-cases

    I chose to take it at face value, and assume that you weren't simply over-generalizing, or talking out of your ass about something you neither know about, nor had even tried yet. If your claim is that I shouldn't have made that assumption, based on totally unrelated posts of yours that I've previously read, then I concede the point.

    Moreover, as others have already pointed out by now, you got the sync/async distinction backwards, which firstly is confusing, and secondly doesn't give me much confidence that you actually understand the thing you're ranting about in the first place.



  • @fterfi secure said:

    If I send you money for a plane ticket, will you come here so I can punch you repeatedly until you shut up?

    Well, that depends.

    1. Where is "here"?
    2. How hard can you punch?
    3. Will you make blakey and morbs the same offer?


  • @Kittemon said:

    Loading a new page is completely beside the point. The key concept is that the WWW is (and has always been) stateless. A single page, along with any embedded or explicitly associated resources, form a context that is considered to be a single entity, which exists in a vacuum. Any open connections are also resources associated with the current context; as such, they should be disposed of along with everything else when the page is unloaded. Similarly, it makes no sense whatsoever to open a new connection during BeforeUnload, as that would load a completely new resource into the current context, just as the browser has begun the process of disposing of the context. Whether your request is synchronous or asynchronous is a red herring.

    Ok; then how do you recommend I solve this problem? Remember, the only access to the site I have is a single <20k JavaScript file on each page.

    @Kittemon said:

    Moreover, as others have already pointed out by now, you got the sync/async distinction backwards, which firstly is confusing, and secondly doesn't give me much confidence that you actually understand the thing you're ranting about in the first place.

    Yes, and I apologize for that. It's confusing terminology I don't use on a daily basis, I have mild dyslexia, when I first used it wrong nobody corrected me (for 3.5 solid pages of comments! How did you pedantic dickweeds hold off so long?!), and so I just went with the flow and assumed I had it correct.



  • @fterfi secure said:

    analytics genuinely is a special case. In its way it's every bit as vital to the web as we know it as, say, HTTP. I think a lot of people don't realise that analytics are absolutely vital in persuading businesses to invest in creating content for the web. The more accurately you can quantise the return, the easier it is to persuade people to put money into something online.

    Do you work in marketing?



  • How is this thread still going?



  • @Sutherlands said:

    How is this thread still going?

    How does the whole SSDS debacle thread keep going?



  • @nonpartisan said:

    @Sutherlands said:

    How is this thread still going?

    How does the whole SSDS debacle thread keep going?
    I have wondered that equally as much.  I think that's because people like provoking him.  Maybe 'him' in this thread is blakey.


  • @blakeyrat said:

    Ok; then how do you recommend I solve this problem? Remember, the only access to the site I have is a single <20k JavaScript file on each page.
     

    I'm going to assume you're being genuine with this question. You could trap all events on links to the page, make your request and then navigate away. This won't work if a user is actually closing the tab/window or using the browsers own navigation buttons. You could (as has been suggested) continually poll the server (which is how some analytics packages work). The worst-case scenario is that you miss a final request to the server on browsers that are closing all the connections, so your data is out by the difference of the duration between polls. If you set this to something suitable your data won't be affected by any meaningful amount.

    Or, you could try and make a case to Apple about why you're so special that you need to do something that apparently other companies don't need to do (there are plenty of analytics packages out there, and they seem to get things done) and see if they bow under the pressure of an infamous blakeyrant and "fix" their browser just for you.



  • @Kittemon said:

    @fterfi secure said:
    If I send you money for a plane ticket, will you come here so I can punch you repeatedly until you shut up?

    Well, that depends.

    1. Where is "here"?
    2. How hard can you punch?
    3. Will you make blakey and morbs the same offer?
    1. Where I am, obviously.
    2. Not so hard, but over and over again.
    3. They know the same offer stands, but I won't be punching them so much as licking them soggy.


  • @Kittemon said:

    @fterfi secure said:
    analytics genuinely is a special case. In its way it's every bit as vital to the web as we know it as, say, HTTP. I think a lot of people don't realise that analytics are absolutely vital in persuading businesses to invest in creating content for the web. The more accurately you can quantise the return, the easier it is to persuade people to put money into something online.

    Do you work in marketing?

    If you don't work for a business that markets its services, you're either unemployed (or about to be) or work in the public sector.


  • @ASheridan said:

    You could try and make a case to Apple about why you're so special that you need to do something that apparently other companies don't need to do (there are plenty of analytics packages out there, and they seem to get things done) and see if they bow under the pressure of an infamous blakeyrant and "fix" their browser just for you.

    Ahh, look, I regard blakey as a competent person and I think I'm not alone in thinking that he is competent (although he sometimes does not choose the best way to show it).  Other companies have not tried this before because we as an industry have shitty standards.  Getting things done is not good enough.  Strive for greatness for fuck sake!



  • @blakeyrat said:

    Ok; then how do you recommend I solve this problem? Remember, the only access to the site I have is a single <20k JavaScript file on each page.

    Off the top of my head:

    • open a persistent connection (web socket maybe?) upon page load, then use the already existing connection to do your thing, rather than opening a new one
    • use POST instead of GET, or even HEAD. Seriously, wtf are you bothering with a pixel load? All you need is a response, not a resource. This is why status 204 exists.
    • find a different event handler to hijack
    • all of those combined
    • just fudge the damn numbers already. "Time Spent on Page" is not the same thing as "Brain Power Expended on Content". As there is no way to accurately derive the latter from the former, it's rather pointless to make the former any more precise than "left the page immediately" vs "left the page open for some minimum time threshold".


  • @ASheridan said:

    Or, you could try and make a case to Apple about why you're so special that you need to do something that apparently other companies don't need to do

    Not sure if serious.

    I think many other companies want the same results as Blakey, just not possibly in the same way - they've all had to implement their own workarounds due to browser limitations/standards.  As you state:

    @ASheridan said:

    (there are plenty of analytics packages out there, and they seem to get things done)

    Potentially adopting some kludge to do it, because HTTP standards dictate the Unload event works in a manner that doesn't easily facilitate good analytic capture.

    @fterfi secure said:

    @Kittemon said:
    Do you work in marketing?

    If you don't work for a business that markets its services, you're either unemployed (or about to be) or work in the public sector.

    I think Kittemon meant "do you work in a marketing department?" rather than "do you work for an organisation that markets its services?"

    @Kittemon said:

    Off the top of my head:

    • just fudge the damn numbers already. "Time Spent on Page" is not the same thing as "Brain Power Expended on Content". As there is no way to accurately derive the latter from the former, it's rather pointless to make the former any more precise than "left the page immediately" vs "left the page open for some minimum time threshold".

    Not incorrect, but if a customer asks for a report showing "Time Spent On Page" I'd show metrics detailing the duration between page entry and page exit. I wouldn't create a report showing "Brain Power Expended on Content" and argue that it's what they wanted, rather than what they asked for.

    (I would if we were still in analysis and design, but it sounds like Blakey's currently in implementation and prior steps are pretty much cut n dried)



  • @Kittemon said:

    Time Spent on Page" is not the same thing as "Brain Power Expended on Content". As there is no way to accurately derive the latter from the former
    Wrong. Extracting signal from noise is a common process in many disciplines, including web analytics.



  • @ASheridan said:

    I'm going to assume you're being genuine with this question. You could trap all events on links to the page, make your request and then navigate away. This won't work if a user is actually closing the tab/window or using the browsers own navigation buttons.

    That also doesn't work with form submissions.

    @ASheridan said:

    You could (as has been suggested) continually poll the server (which is how some analytics packages work). The worst-case scenario is that you miss a final request to the server on browsers that are closing all the connections, so your data is out by the difference of the duration between polls.

    As I said above, the last event before the UNLOAD is typically the by-far-most-important one to know. Also, just spamming pixels every X seconds? Come on, even if that did work, that's shit.

    @ASheridan said:

    Or, you could try and make a case to Apple about why you're so special that you need to do something that apparently other companies don't need to do (there are plenty of analytics packages out there, and they seem to get things done) and see if they bow under the pressure of an infamous blakeyrant and "fix" their browser just for you.

    Most of them actually do exactly what I'm doing. At least, the ones interested in tracking DOM events at all. I'm not the only one who would benefit.

    @Kittemon said:

    @blakeyrat said:
    Ok; then how do you recommend I solve this problem? Remember, the only access to the site I have is a single <20k JavaScript file on each page.

    Off the top of my head:

    • open a persistent connection (web socket maybe?) upon page load, then use the already existing connection to do your thing, rather than opening a new one
    • use POST instead of GET, or even HEAD. Seriously, wtf are you bothering with a pixel load? All you need is a response, not a resource. This is why status 204 exists.
    • find a different event handler to hijack
    • all of those combined
    • just fudge the damn numbers already. "Time Spent on Page" is not the same thing as "Brain Power Expended on Content". As there is no way to accurately derive the latter from the former, it's rather pointless to make the former any more precise than "left the page immediately" vs "left the page open for some minimum time threshold".
    1. That is an interesting idea, and I should work on that when I get time to work on the web server.

      2) I had no idea it was possible to send a HEAD request from JS, but a little Googling shows it is-- another good suggestion.

      3) Like what? There's only BEFOREUNLOAD and UNLOAD, and the latter definitely doesn't like new connections.

      4)

      5) Obviously the code isn't magic. But I'm not going to report an obviously bogus value for "time on page", and if we don't report it at all we're not as competitive.

    Thanks for the suggestions. The HEAD one I can look into right now without having to do any server-side work, so let's see if that improves things.



  • @blakeyrat said:

    2) I had no idea it was possible to send a HEAD request from JS, but a little Googling shows it is-- another good suggestion.

    Nope; that runs afoul of XSS protection, since my webserver isn't on the same domain as the client's site. It occurs to me that WebSockets probably has the same limitation, yes?

    So... image request it is.



  • @blakeyrat said:

    @blakeyrat said:
    2) I had no idea it was possible to send a HEAD request from JS, but a little Googling shows it is-- another good suggestion.

    Nope; that runs afoul of XSS protection, since my webserver isn't on the same domain as the client's site. It occurs to me that WebSockets probably has the same limitation, yes?

    So... image request it is.

    Technically, no. But websockets has extremely limited support. It's been repeatedly disabled in clients because of huge security holes.

    Also, keeping an open connection for every single client using your code? Think your server can support that? And will the browser even keep the websocket connection open during beforeunload?

    Look, this is a guy who thinks web analytics are useless and "a href= is the only thing vital to the web". What kind of dumbass shit is that?



  • @Kittemon said:

    @morbiuswilters said:
    I guess a third option exists: you are trolling. But I find it annoying when people accuse others of trolling; it's real crybaby stuff.

    Yet here you go...

    @morbiuswilters said:

    I'm not sure how not calling you a troll makes me a liar, though.

    +1, subtlety

    Man, you suck at reading comprehension, which may explain why this thread is still going. I wasn't implying you are trolling. Trolls are usually smarter than this.



  • @blakeyrat said:

    @Kittemon said:
    Moreover, as others have already pointed out by now, you got the sync/async distinction backwards...
    Yes, and I apologize for that.
    It's confusing terminology I don't use on a daily basis, I have mild dyslexia, when I first used it wrong nobody corrected me (for 3.5 solid pages of comments! How did you pedantic dickweeds hold off so long?!)
    Our telepathy wasn't working very well and we assumed that you meant what you wrote. It wasn't until you added a clarifying comment later that we realised you seemed to have it mixed up.

    On the actual problem... nice to see some reasonable solutions being suggested. Sorry to see they don't seem to be working for you so far. It does seem to be a tough problem, so best of luck with it. (I have nothing substantive to add: I don't work with web stuff at all. It's infrequent for me to even look at the reporting layer; I'm all about the data.)



  • @blakeyrat said:

    That also doesn't work with form submissions
     

    Yes, unless you use the mystical and mysterious event handlers attached to the form, say like the onsubmit handler... I guess you're not that experienced with Javascript, because this is generally one of the first things anyone does with Javascript, and is nearly every damn tutorial I've ever seen. I think more important than any other suggestions is to get an expert on it, not someone who codes a bit of Javascript in their spare time.

     



  • @ASheridan said:

    ... the onsubmit handler... is generally one of the first things anyone does with Javascript, and is nearly every damn tutorial I've ever seen.

    Really?

    When teaching Javascript, I introduce event handling with mouseover/mouseout then progress to load/unload, leaving form processing as a later exercise.  Even then I trawl through events for the visible form controls (buttons, checkboxes, options etc) before doing validation via onsubmit (primarily because there's always someone that never returns true upon valid, and wonders why their form never gets submitted).

    Not disputing your evidence, but I'd have thought anyone's first taste of learning Javascript was event handling via form submission chucks them in the deep end slightly.

    Minor WTF: the first tutorial I read had a template with <BODY onload="yourscript.js"> and you were required to drop your code into that included file. The suggested solution was full of "document.write" which worked in IE but nothing else... until we worked out that any script output was going to be written into the <body> tag. Yes, it was back in IE5/NN4.7 days.



  • @ASheridan said:

    @blakeyrat said:

    That also doesn't work with form submissions
     

    Yes, unless you use the mystical and mysterious event handlers attached to the form, say like the onsubmit handler... I guess you're not that experienced with Javascript, because this is generally one of the first things anyone does with Javascript, and is nearly every damn tutorial I've ever seen. I think more important than any other suggestions is to get an expert on it, not someone who codes a bit of Javascript in their spare time.

    Just shut the fuck up if you don't have anything productive to say. In fact shut the fuck up anyway. And fuck you.

    You know how fun it is to post something here, as a WTF (NOT asking for help) and to get nothing but 5,000 replies either giving you unsolicited advice that doesn't fucking work, or calling you an idiot because despite having worked on this project for nearly 5 years I must be missing something real obvious!!! You asshole.

    This is why the forums are nearly dead, why nobody starts their own topics-- they don't want to be browbeat by morons. Yeah, we get it: it's so fun bullying the Blakeyrat!!! My favoritest hobby ever!!! He thinks very slightly differently from us so obviously he needs to be mocked at every opportunity!!! And if you can't find an excuse to mock him, give him unsolicited advice that doesn't work until he gets pissed off then you can mock him!!!

    You know what? Fuck it all.



  • @blakeyrat said:

    Yeah, we get it: it's so fun bullying the Blakeyrat!!! My favoritest hobby ever!!! He thinks very slightly differently from us so obviously he needs to be mocked at every opportunity!!!
     

    Or could it be that a lot of this is brought about by you're constantly calling everyone else morons and telling them they're basically idiots because their opinions differs from yours? If you give it, you've got to either be prepared to take it, or stop feeding the trolls.

     


  • ♿ (Parody)

    @blakeyrat said:

    You know how fun it is to post something here, as a WTF (NOT asking for help) and to get nothing but 5,000 replies either giving you unsolicited advice that doesn't fucking work, or calling you an idiot because despite having worked on this project for nearly 5 years I must be missing something real obvious!!! You asshole.

    What are you, a woman? If a man hears about a problem, he will try to come up with a way to fix it. Inexperience and inattention to details are not considered barriers.



  • @ASheridan said:

    Or could it be that a lot of this is brought about by you're constantly calling everyone else morons and telling them they're basically idiots because their opinions differs from yours?

    No, I call them morons because they offer unsolicited advice. Which at the very least is a form of social retardation.

    And I call them idiots because they keep offering the same unsolicited advice that doesn't fucking work, but refuse to actually test their own advice or read up on why it won't work.

    And the really, really stupid thing is that their opinions don't differ from mine-- we both agree that what I'm doing is stupid-- it's just that for some reason they don't understand that, and keep coming in here and saying what I'm doing is stupid. Yes, I know it is. We've gone over it 5 times in this fucking thread.

    @ASheridan said:

    If you give it, you've got to either be prepared to take it, or stop feeding the trolls.

    You're nothing but a middle school bully. You're not trolling. You're just shitting all over everything because your mommy didn't pay you enough attention as a child.



  • @boomzilla said:

    What are you, a woman?

    Because obviously that would be a bad thing, right?

    Hey look! In case you didn't have enough reasons to hate boomzilla before, he's also a misogynist!



  • @blakeyrat said:

     ... having worked on this project for nearly 5 years I must be missing something real obvious!!!

    Maybe you'ld have noticed it if you hadn't spent your time constantly in the debugger.



  •  @blakeyrat said:

    No, I call them morons because they offer unsolicited advice. Which at the very least is a form of social retardation.

    If you post on here, as Boomzilla said, expect people to comment back and make suggestions. It's an open forum. If you don't want replies, then don't post here.

    @blakeyrat said:

    And the really, really stupid thing is that their opinions don't differ from mine-- we both agree that what I'm doing is stupid-- it's just that for some reason they don't understand that, and keep coming in here and saying what I'm doing is stupid.

    Except, you just mentioned that you felt you were bullied because you were thinking differently from everyone else:

    @blakeyrat said:

    He thinks very slightly differently from us so

    make up your damn mind, it's bad enough when you expect people to read other threads to get context to this one, let alone when you start changing your mind between posts made minutes apart.

    @blakeyrat said:

    You're just shitting all over everything because your mommy didn't pay you enough attention as a child.

    un-fucking-related, that has nothing to do with it. I made suggestions, then when you got all ranty, I got sarcastic with my suggestions. I didn't start firing off calling people morons for making suggestions that were completely in-line with your original post. If you can't put across your thoughts coherently you will get useless answers. Garbage in, garbage out.

     


  • ♿ (Parody)

    @blakeyrat said:

    @boomzilla said:
    What are you, a woman?

    Because obviously that would be a bad thing, right?

    Well, I can't stop you from hating women, blakeyrat (why else would you jump to this conclusion?), but the implication here is that you don't even understand yourself. You obviously can't actually be a woman, since there are no women on the internet.

    I also can't force you to stop trying to suppress forum traffic by making up blakeyrat ego stoking reasons not to post.


  • Discourse touched me in a no-no place

    @blakeyrat said:

    @boomzilla said:
    What are you, a woman? [If a man hears about a problem, he will try to come up with a way to fix it[quote reinserted]]

    Because obviously that would be a bad thing, right?

    Hey look! In case you didn't have enough reasons to hate boomzilla before, he's also a misogynist!

    Hey look! Blakey's QOOC, failing to STR, and spouting bollocks as a result again. The reference (and quote) you missed was out of Men are from Mars, Women are from Venus, and it's about the theory that
    [...] men complain about problems because they are asking for solutions while women complain about problems because they want their problems to be acknowledged

    Your behaviour is more like the latter, since you seem to moan incessantly when presented with lots of solutions, when all you want to do is talk about your problems.


  • @boomzilla said:

    there are no women on the internet.
    I call shenanigans!  I've seen thousands of women on the Internet.  Ever heard of porn?!  Smartass...



  • @C-Octothorpe said:

    @boomzilla said:

    there are no women on the internet.
    I call shenanigans!  I've seen thousands of women on the Internet.  Ever heard of porn?!  Smartass...

    Ever heard of sex change operations?



  • @serguey123 said:

    @C-Octothorpe said:

    @boomzilla said:

    there are no women on the internet.
    I call shenanigans!  I've seen thousands of women on the Internet.  Ever heard of porn?!  Smartass...

    Ever heard of sex change operations?
    Well, if that's what you're in to...  That's pretty specifc, though.  Kind of like my sadomasopedorobonecrobestiality fetish.

    EDIT: I have to point out that I've never heard of sadomasopedorobonecrobestiality, but for some reason was the top suggestion when I typed "sad" in google...



  • @C-Octothorpe said:

    Well, if that's what you're in to...  That's pretty specifc, though.  Kind of like my sadomasopedorobonecrobestiality fetish.

    You are confusing me with dhromed

    @C-Octothorpe said:

     

    EDIT: I have to point out that I've never heard of sadomasopedorobonecrobestiality, but for some reason was the top suggestion when I typed "sad" in google...

    Google uses your previous searches among other things to make the sugestions, you pervert!


Log in to reply