Webpage redirection time

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ABHIJEEEEET
    New Member
    • Jan 2010
    • 3

    Webpage redirection time

    Hi all,

    I want to calculate time consumed in redirecting from 1 webpage to another webpage.
    For Example:
    1) I am using Facebook in Google Chrome browser.
    I have shared 1 link on my Facebook profile like below:

    http://www.webdevelope r.com/

    2) When I click on this link from my Facebook profile, then this website will open in new tab.

    3) I want to calculate time difference in miliseconds or microseconds between below two events:
    First Event: Time of clicking link "http://www.webdevelope r.com/" from my Facebook profile.
    Second Event: Time of completely loading webpage of "http://www.webdevelope r.com/".

    Thank you in advance.
  • gits
    Recognized Expert Moderator Expert
    • May 2007
    • 5390

    #2
    you cannot do that - since it would involve coding in both pages.

    Comment

    • zmbd
      Recognized Expert Moderator Expert
      • Mar 2012
      • 5501

      #3
      Gits, Why not design the link to pass the current time to the linked website?

      Comment

      • gits
        Recognized Expert Moderator Expert
        • May 2007
        • 5390

        #4
        since the linked page cannot do anything with it - except you have access to code in it, which i doubt it is the case in the OP. you cannot even access the new window's onload event - which is due to the same origin policy - that will help to avoid cross-site-scripting issues.
        Last edited by gits; Dec 6 '12, 01:39 PM.

        Comment

        • zmbd
          Recognized Expert Moderator Expert
          • Mar 2012
          • 5501

          #5
          IS there nothing in the "HTTP-referer" header that could be used?
          It is my understanding that a webserver at least can determine something along these lines:

          {IP.Address - - [12/Dec/2012:10:36:26 -0600] "SomeURLInf o" 200 12120 "-" "Browser (Operating System) (etc)}

          Couldn't that time be used?

          Comment

          • gits
            Recognized Expert Moderator Expert
            • May 2007
            • 5390

            #6
            to determine the time from calling a link until the linked page is fully loaded u would need to determine the timestamps of:

            1: the click of the link - that's easy, use an onclick-event and u are fine.

            2: the onload-event of the linked page - that seems impossible when the page is from another domain - unless you can code something there. you cannot (and should not even try to) inject any javascript-code to another site - at least not without more advanced techniques that i dont want to explain here.

            Comment

            • gits
              Recognized Expert Moderator Expert
              • May 2007
              • 5390

              #7
              in case - the direction of actions is like that i described - AND you can access the code of the 'linked' page - then its simple of course - just pass the click-timestamp with the URL for example - and receive it in the page - use the onload-event and calculate the time-difference.

              Comment

              • zmbd
                Recognized Expert Moderator Expert
                • Mar 2012
                • 5501

                #8
                Injecting any code into another site's page wasn't where I was going at all and I apologize if that was the impression given.

                I was just looking at the fact that most web browsers tend to send or make available a lot of information about where you were, when you were there, what OS, etc... There are a lot of "security" websites that demonstrate what they can pull from your computer. GRC is one such...

                However, it appears that even that information isn't available within this context.

                Comment

                • gits
                  Recognized Expert Moderator Expert
                  • May 2007
                  • 5390

                  #9
                  the problem is in the requirement of: 'Time of completely loading webpage'

                  this is the point where the page's onload-event is fired - and that is just a browser-event. that is not propagated back to the server - so this information isn't available there without any coding. to make that worse - in case you have a page with frames - then the above requirement would imply that all pages in the base-page are loaded first and then you have to measure the time - so that would require coding in all sub-pages to synchronize the events.

                  there is no need to apologize - you didn't give the impression that you suggest to inject code to a page - i was only saying that without that, it is not possible. and to implement the code legally would require legal control of that page of course.

                  Comment

                  • ABHIJEEEEET
                    New Member
                    • Jan 2010
                    • 3

                    #10
                    Thank you for your responses.
                    I decided to go ahead with firebug for Firefox and Developer Tools for Chrome.
                    My problem is solved.

                    Comment

                    Working...