Obtaining the start time when a web browser begins to load AND obtaining the start time of an HTTP request of...





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







1















As I have been googling around I have seen many posts on other websites of people asking this question with no solution



I am trying to figure out how long it's taking my web server running NGINX
to receive a request from the browser, the server itself once it says it receives a particular http request reports in its logs mere 6MS to complete it, however from the browser its taking 11+ seconds. I need to measure the time between when an HTTP request was made to server and the time it took for the server to receive the request to solve my issue.



There is nowhere in the google chrome developer tools that can tell me a timestamp when a website started to load - each subsequent HTTP request says how many seconds or milliseconds since the page load began, takes place. If I know when the page began to load I can do the math manually to figure out the timestamp of my API request using the devtools waterfall.










share|improve this question





























    1















    As I have been googling around I have seen many posts on other websites of people asking this question with no solution



    I am trying to figure out how long it's taking my web server running NGINX
    to receive a request from the browser, the server itself once it says it receives a particular http request reports in its logs mere 6MS to complete it, however from the browser its taking 11+ seconds. I need to measure the time between when an HTTP request was made to server and the time it took for the server to receive the request to solve my issue.



    There is nowhere in the google chrome developer tools that can tell me a timestamp when a website started to load - each subsequent HTTP request says how many seconds or milliseconds since the page load began, takes place. If I know when the page began to load I can do the math manually to figure out the timestamp of my API request using the devtools waterfall.










    share|improve this question

























      1












      1








      1








      As I have been googling around I have seen many posts on other websites of people asking this question with no solution



      I am trying to figure out how long it's taking my web server running NGINX
      to receive a request from the browser, the server itself once it says it receives a particular http request reports in its logs mere 6MS to complete it, however from the browser its taking 11+ seconds. I need to measure the time between when an HTTP request was made to server and the time it took for the server to receive the request to solve my issue.



      There is nowhere in the google chrome developer tools that can tell me a timestamp when a website started to load - each subsequent HTTP request says how many seconds or milliseconds since the page load began, takes place. If I know when the page began to load I can do the math manually to figure out the timestamp of my API request using the devtools waterfall.










      share|improve this question














      As I have been googling around I have seen many posts on other websites of people asking this question with no solution



      I am trying to figure out how long it's taking my web server running NGINX
      to receive a request from the browser, the server itself once it says it receives a particular http request reports in its logs mere 6MS to complete it, however from the browser its taking 11+ seconds. I need to measure the time between when an HTTP request was made to server and the time it took for the server to receive the request to solve my issue.



      There is nowhere in the google chrome developer tools that can tell me a timestamp when a website started to load - each subsequent HTTP request says how many seconds or milliseconds since the page load began, takes place. If I know when the page began to load I can do the math manually to figure out the timestamp of my API request using the devtools waterfall.







      google-chrome google-chrome-devtools






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 5 at 18:51









      alillandalilland

      1163




      1163






















          1 Answer
          1






          active

          oldest

          votes


















          1














          there is a chrome API that can be used in the developer tools console:



          To obtain the web pages browser load start time in the console you can run



          performance.timeOrigin
          // => 1551815483060.8398


          to convert this value to a readable timestamp:



          new Date(performance.timeOrigin).toUTCString()
          // => "Tue, 05 Mar 2019 19:51:23 GMT"


          next, you will need to get the startTime of the loaded resource, to see all the resources that got loaded the following command will work list them out in the console



          performance.getEntriesByType('resource')
          // =>


          (will return an array of loaded resources), that array will not be blank like the one I listed, it will have a property of startTime with the MS since the page load began



          performance.getEntriesByType('resource')[5].startTime
          // => 2820.3300000022864


          You can then add those two values together to get the official date stamp when the browser began its request to your server



          new Date(performance.timeOrigin + performance.getEntriesByType('resource')[5].startTime).toUTCString()
          // => "Tue, 05 Mar 2019 19:51:25 GMT"


          for details on the performance interface, see the following docs






          share|improve this answer
























            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "3"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1411566%2fobtaining-the-start-time-when-a-web-browser-begins-to-load-and-obtaining-the-sta%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            1














            there is a chrome API that can be used in the developer tools console:



            To obtain the web pages browser load start time in the console you can run



            performance.timeOrigin
            // => 1551815483060.8398


            to convert this value to a readable timestamp:



            new Date(performance.timeOrigin).toUTCString()
            // => "Tue, 05 Mar 2019 19:51:23 GMT"


            next, you will need to get the startTime of the loaded resource, to see all the resources that got loaded the following command will work list them out in the console



            performance.getEntriesByType('resource')
            // =>


            (will return an array of loaded resources), that array will not be blank like the one I listed, it will have a property of startTime with the MS since the page load began



            performance.getEntriesByType('resource')[5].startTime
            // => 2820.3300000022864


            You can then add those two values together to get the official date stamp when the browser began its request to your server



            new Date(performance.timeOrigin + performance.getEntriesByType('resource')[5].startTime).toUTCString()
            // => "Tue, 05 Mar 2019 19:51:25 GMT"


            for details on the performance interface, see the following docs






            share|improve this answer




























              1














              there is a chrome API that can be used in the developer tools console:



              To obtain the web pages browser load start time in the console you can run



              performance.timeOrigin
              // => 1551815483060.8398


              to convert this value to a readable timestamp:



              new Date(performance.timeOrigin).toUTCString()
              // => "Tue, 05 Mar 2019 19:51:23 GMT"


              next, you will need to get the startTime of the loaded resource, to see all the resources that got loaded the following command will work list them out in the console



              performance.getEntriesByType('resource')
              // =>


              (will return an array of loaded resources), that array will not be blank like the one I listed, it will have a property of startTime with the MS since the page load began



              performance.getEntriesByType('resource')[5].startTime
              // => 2820.3300000022864


              You can then add those two values together to get the official date stamp when the browser began its request to your server



              new Date(performance.timeOrigin + performance.getEntriesByType('resource')[5].startTime).toUTCString()
              // => "Tue, 05 Mar 2019 19:51:25 GMT"


              for details on the performance interface, see the following docs






              share|improve this answer


























                1












                1








                1







                there is a chrome API that can be used in the developer tools console:



                To obtain the web pages browser load start time in the console you can run



                performance.timeOrigin
                // => 1551815483060.8398


                to convert this value to a readable timestamp:



                new Date(performance.timeOrigin).toUTCString()
                // => "Tue, 05 Mar 2019 19:51:23 GMT"


                next, you will need to get the startTime of the loaded resource, to see all the resources that got loaded the following command will work list them out in the console



                performance.getEntriesByType('resource')
                // =>


                (will return an array of loaded resources), that array will not be blank like the one I listed, it will have a property of startTime with the MS since the page load began



                performance.getEntriesByType('resource')[5].startTime
                // => 2820.3300000022864


                You can then add those two values together to get the official date stamp when the browser began its request to your server



                new Date(performance.timeOrigin + performance.getEntriesByType('resource')[5].startTime).toUTCString()
                // => "Tue, 05 Mar 2019 19:51:25 GMT"


                for details on the performance interface, see the following docs






                share|improve this answer













                there is a chrome API that can be used in the developer tools console:



                To obtain the web pages browser load start time in the console you can run



                performance.timeOrigin
                // => 1551815483060.8398


                to convert this value to a readable timestamp:



                new Date(performance.timeOrigin).toUTCString()
                // => "Tue, 05 Mar 2019 19:51:23 GMT"


                next, you will need to get the startTime of the loaded resource, to see all the resources that got loaded the following command will work list them out in the console



                performance.getEntriesByType('resource')
                // =>


                (will return an array of loaded resources), that array will not be blank like the one I listed, it will have a property of startTime with the MS since the page load began



                performance.getEntriesByType('resource')[5].startTime
                // => 2820.3300000022864


                You can then add those two values together to get the official date stamp when the browser began its request to your server



                new Date(performance.timeOrigin + performance.getEntriesByType('resource')[5].startTime).toUTCString()
                // => "Tue, 05 Mar 2019 19:51:25 GMT"


                for details on the performance interface, see the following docs







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Mar 5 at 20:10









                alillandalilland

                1163




                1163






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Super User!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1411566%2fobtaining-the-start-time-when-a-web-browser-begins-to-load-and-obtaining-the-sta%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    How do I know what Microsoft account the skydrive app is syncing to?

                    Grease: Live!

                    When does type information flow backwards in C++?