Method and system for detecting slow page load
A method and system for detecting slow page load is provided. An example system comprises a page request detector, a time-out module, a time-out monitor, and a lightweight page requestor. The page request detector may be configured to detect a request for a web page. The time-out module may be configured to commence a time-out period in response to a request for a web page. The time-out module cooperates with the time-out monitor that may be configured to determine that rendering of a rich version of the requested web page has not commenced at an expiration of the time-out period. The lightweight page requestor may be configured to cause a lightweight version of the requested page to be provided to the client system when the time-out monitor determines that the rendering of a rich version of the requested web page has not commenced at an expiration of the time-out period.
1 . A client computer system, comprising:
one or more processors; and
a non-transitory computer-readable medium having stored thereon instructions that are executable by the one or more processors to cause the client computer system to perform operations comprising:
detecting that a particular request for a first version of a web page has been sent to a content server system;
initiating a timer countdown in response to the detecting;
receiving a particular data packet from the content server system;
in response to an expiration of the timer countdown, determining that content associated with the first version has not been rendered;
based on the determining, sending a different request for a second version of the web page; and
sending a response to the particular data packet, wherein the response includes a request to determine connection speed.
2 . The client computer system of claim 1 , further comprising a display, and wherein sending the different request includes:
displaying, on the display, a prompt to suggesting a switch to the second version; and
sending the different request in response to receiving a confirmation to the prompt.
3 . The client computer system of claim 1 , wherein the first version includes rich content associated with the web page, and wherein the second version is a lightweight version of the web page.
4 . The client computer system of claim 1 , wherein sending the response to the particular data packet occurs prior to sending the different request for the second version of the web page.
5 . The client computer system of claim 1 , wherein the operations further include:
prior to the expiration of the timer countdown, receiving a different data packet from the content server system, wherein the different data packet has been modified to include a connection speed in addition to a portion of data for the first version of the web page.
6 . The client computer system of claim 5 , wherein sending the different request includes:
determining that the connection speed between the client computer system and the content server system does not satisfy a threshold; and
based on determining the threshold is not satisfied, sending the different request.
7 . The client computer system of claim 1 , wherein sending the different request includes:
determining that computing resources of the client computer system are insufficient for loading the first version of the web page; and
based on determining the computing resources are insufficient, sending the different request.
8 . The client computer system of claim 1 , wherein the operations include JavaScript received by the client computer system from the content server system.
9 . A method, comprising:
detecting, by a process executing on a client computer system, that a particular request for a first version of a web page has been sent to a content server system;
in response to detecting the particular request, commencing, by the process, a time-out period;
receiving, by the process, a particular data packet from the content server system, wherein the particular data packet has been modified to include a connection speed in addition to a portion of data for the first version of the web page;
in response to an expiration of the time-out period, determining, by the process, that content associated with the first version has not begun rendering; and
in response to the determining, sending, by the process, a different request for a second version of the web page.
10 . The method of claim 9 , further comprising:
receiving, by the process, a different data packet from the content server system; and
sending, by the process, a response to the different data packet, wherein the response includes a request to determine connection speed.
11 . The method of claim 10 , wherein sending response to the different data packet includes sending, by the process, the response based on the expiration of the time-out period.
12 . The method of claim 9 , wherein the particular data packet is received prior to the expiration of the time-out period.
13 . The method of claim 12 , wherein sending the different request includes:
determining, by the process, that the connection speed between the client computer system and the content server system does not satisfy a threshold; and
based on determining the threshold is not satisfied, sending, by the process, the different request.
14 . The method of claim 9 , wherein sending the different request includes:
determining, by the process, that computing resources of the client computer system are insufficient for loading the first version of the web page; and
based on determining the computing resources are insufficient, sending, by the process, the different request.
15 . A non-transitory computer readable medium having instructions stored thereon that are executable by a computer system to cause the computer system to perform operations comprising:
sending, to a content server system, a first request for a first version of a web page;
detecting, by a process executing on the computer system, the sending of the first request;
in response to the detecting, starting, by the process, a time-out period;
receiving a particular data packet from the content server system, wherein the particular data packet has been modified to include a connection speed in addition to a portion of data for the first version of the web page;
in response to an expiration of the time-out period, determining, by the process, that rendering of content associated with the first version has not commenced; and
in response to the determining, sending a different request for a second version of the web page.
16 . The non-transitory computer readable medium of claim 15 , wherein the operations further comprise:
receiving a different data packet from the content server system; and
sending a response to the different data packet, wherein the response includes a request to determine connection speed.
17 . The non-transitory computer readable medium of claim 16 , wherein the different data packet is associated with the second version of the web page.
18 . The non-transitory computer readable medium of claim 15 , wherein the particular data packet is received prior to the expiration of the time-out period.
19 . The non-transitory computer readable medium of claim 15 , wherein to send the different request, the operations further comprise:
determining that the connection speed between the computer system and the content server system does not satisfy a threshold; and
based on determining the threshold is not satisfied, sending the different request.
20 . The non-transitory computer readable medium of claim 15 , wherein to send the different request, the operations further comprise:
determining that computing resources of the computer system are insufficient for loading the first version of the web page; and
based on determining the computing resources are insufficient, sending the different request.