System and method for sharing web browser state information between user devices

A user device comprising: i) a memory configured to store a browser application; and ii) a processor configured to execute the browser application, identify browser state information, and transfer the browser state information to a second user device. The browser state information comprises: a) a URL of a current webpage; and b) scroll position information associated with a current viewing rectangle in the current webpage, wherein the scroll position information comprises a scroll position of context text closest to a top-left corner of the current viewing rectangle. The scroll position information further comprises a scroll position of an image element closest to a top-left corner of the current viewing rectangle.

TECHNICAL FIELD

The present application relates generally to browser-capable information devices and, more specifically, to a method of transferring enhanced browser state information between browser-capable user devices.

BACKGROUND

Many information devices (e.g., computers, smartphones, smart TVs, tablet computers) provide a capability to enable a first information device to communicate with another information device and move a task from one device to another. For example, a user can start browsing a web page on a smartphone and pick up the same link on a tablet or a laptop computer. However, conventional systems that transfer web browser state information are essentially limited to transmitting a URL of the current browsing webpage. Although a user may be able to continue browsing the same website, key information of the browser state are missing. By way of example, scroll position is lost. The user must start from the beginning of the webpage and scroll to the same location on the webpage at which he or she paused when initiating the transfer to another device. Also, session information is lost. For example, user may be forced to re-enter a username and a password if the webpage is a secure one. Alternatively, the user may be forced to restart a shopping process from the beginning. Also, form data is not preserved, so the user must re-enter all input data if the user stopped in the middle of the filling-in the form on the first device.

This problem is further complicated by the fact that information devices use many different screen sizes. Even if a second device loads the same webpage as a first device, the layout of the webpage content on the second device may be significantly different from the first (original) device. Scrolling to the same relative position of the viewport rectangle does not guarantee the same content shows in the view. Another problem is the content of the webpage itself. If the two devices differ significantly, the same URL may retrieve different web content (e.g., mobile vs. desktop version) of the same web site.

Therefore, there is a need in the art for an improved apparatus and method for transfer web browser information from a first information device to a second information device. In particular, there is a need for an apparatus and method for transferring scroll position and form content between browser-capable processing systems.

SUMMARY

To address the above-discussed deficiencies of the prior art, it is a primary object to provide a user device comprising: i) a memory configured to store a browser application; and ii) a processor configured to execute the browser application, identify browser state information, and transfer the browser state information to a second user device. The browser state information comprises: a) a URL of a current webpage; and b) scroll position information associated with a current viewing rectangle in the current webpage, wherein the scroll position information comprises a scroll position of context text closest to a top-left corner of the current viewing rectangle.

In an advantageous embodiment, the scroll position information comprises a scroll position of an image element closest to a top-left corner of the current viewing rectangle.

It is another primary object to provide a method for use in a user device comprising a memory configured to store a browser application and a processor configured to execute the browser application. The method comprises: i) identifying browser state information; and ii) transferring the browser state information to a second user device. The browser state information comprises: a) a URL of a current webpage; and b) scroll position information associated with a current viewing rectangle in the current webpage, wherein the scroll position information comprises a scroll position of context text closest to a top-left corner of the current viewing rectangle.

It is another primary object to provide a non-transitory computer readable medium configured to control a processor to perform a method of transferring browser state information from a sending user device to a receiving user device. The method comprises: i) identifying browser state information in the sending user device; and ii) transferring the browser state information from the sending user device to the receiving user device. The browser state information comprises a) a URL of a current webpage; and b) scroll position information associated with a current viewing rectangle in the current webpage, wherein the scroll position information comprises a scroll position of context text closest to a top-left corner of the current viewing rectangle.

DETAILED DESCRIPTION

This present disclosure provides an improved web browser application that restores the browser to its full previous state after the browser state information is transferred from a first user device to a second user device. The enhanced browser state information includes: i) the URL of the browsing website; ii) scroll position of the webpage using a heuristic approach; iii) session information of the webpage using cookies; iv) form data for the webpage; and v) web state and session transfer between vastly different devices/form factors (PC, mobile, tablet, TV, head mounted device, wearable).

FIG. 1illustrates communication network100in which browser-capable user devices120,130,140, and150exchange browser state information according to an embodiment of the disclosure. In the exemplary embodiment, user device120is assumed to be mobile phone120, user device130is assumed to be tablet130, user device140is assumed to be smart television (TV)140, and user device150is assumed to be laptop personal computer (PC)150. According to the principles of the present disclosure, user devices120,130,140, and150exchange the enhanced browser state information via Internet protocol (IP) network110, such as Internet110, or home network110. It is noted that mobile phone120, tablet130, smart TV140, and laptop PC150have different screen sizes and resolutions, and are operated by different input devices.

FIG. 2illustrates two browser-capable user devices210and250exchanging enhanced browser state information according to an embodiment of the disclosure. Each of user devices210and250may be any one of mobile phone120, tablet130, smart TV140, and laptop PC150. It is assumed inFIG. 2that user device210is the first (i.e., original, sending, transmitting) user device210. When a user initiates a transfer action from first (or sending) device browser application215, sending device browser application215starts to collect all the enhanced state information described above.

Sending device browser application215then composes the enhanced state information into a text message and sends the text message over to the second (receiving) user device250through a communication link, such as the Transfer service on Samsung smartphones and tablets. InFIG. 2, Transfer service220in sending user device210establishes a communication link with Transfer service260in receiving user device250. The communication link transmits the text message containing the enhanced state information and prompts the user on receiving user device250. Second (or receiving) device browser application255is launched on receiving user device250, which prepares to restore the webpage state received from Transfer service260. First, receiving device browser application255restores the cookies for the website. Next, receiving device browser application255loads the URL. After the webpage is fully loaded, receiving device browser application255restores the other browser states, including scroll position, form data, and zoom level.

The present disclosure describes below how the scroll position information is collected from sending device browser application215on sending user device210and how the scroll position information is restored in receiving device browser application255in receiving user device250. The scroll position restoration process provided by the present disclosure comprises a heuristic approach. The sending device browser application215first identifies a context text string in the original webpage that can specify the scroll offset of the current page and then searches for the same text in the receiving device browser application255and scrolls the page to reveal the context text.

This text-based scroll position restoration works even if: i) the layout of the web page on the receiving device is different from the sending (or transmitting) device; ii) the content of the web page on the receiving device is not identical to the transmitting device (i.e., different content for different browsers, dynamic news content, different web banners, etc.). The transfer of enhanced browser state information works best in local area networks (e.g., home networks), because the public-facing IP address does not change between saving and restoring the client session. Thus, the originating webpage server does not detect the transfer.

Collecting Scroll Position Information

Initially, sending device browser application215collects the scroll position information that is used to restore the scroll position on receiving device browser application255. In addition to the coordinates-based scroll position, sending device browser application215also determines the context text. In essence, sending device browser application215searches for and identifies some text with enough content on the top-left corner of the current screen view of sending user device210. The details are illustrated inFIGS. 4A and 4Bbelow. When the screen view is composed mostly of images, the source URL of the top-left image may be used.

Compose Scroll Position Information

Sending device browser application215determines the complete scroll position information, which may be composed of several fields that are shown in TABLE 1. In an exemplary embodiment, the data fields may be put together in a JSON format along with other browser state information and may be sent to receiving device browser application255.

TABLE 1isImageIndicates if the scrollToText is fromimage source URL.scrollToTextThe text of the 1st InlineTextBox in thecontext text sentences, ifisImage is false or the text of the imagesource URL if isImage is true.scrollToContextTextThe text of the context text sentences.scrollToTextPositionInViewThe position of the scrollToText relativeto the view.scrollViewPositionThe viewport scroll position relative tothe document content.

Restore Scroll Position

After the enhanced browser state information is transferred to receiving user device250, receiving device browser application255uses the transferred browser state information in the text message to restore the scroll position. The scroll position is restored after the URL is successfully loaded. Receiving device browser application255performs a text search on the webpage or a text match with the image source URL (if the “isImage” field is “True”), and scrolls to the position where a match is found. The details are illustratedFIGS. 5 and 6below.

Cookie Transfer

Sending device browser application215also transfers the cookies of the current URL in order to restore the session state of the webpage using receiving device browser application255. In an exemplary embodiment, a cookie having the properties in TABLE 2 may be transferred.

TABLE 2NameName of the cookieValueValue of the cookiedomainSpecifies the domain of the sitepathSpecifies the directory path the cookie belongs toexpiryDateSpecifies the expiration time of the cookie in GMT formatisSecureIndicates whether to transmit the cookie over httpsisHttpOnlySpecifies whether a cookie is accessible by client-side script.

Form Data Transfer

Sending device browser application215collects Form Data using conventional Web APIs. Receiving device browser application255restores the form with filled-in data on the remote device.

FIG. 3illustrates in greater detail exemplary browser-capable mobile phone120that exchanges browser state information according to an embodiment of the disclosure. Mobile phone120is also representative of tablet130, smart TV140, and laptop computer150. Mobile phone120may operate as either sending user device210or receiving user device250by exchanging enhanced browser state information according to the principles of the disclosure.

In one embodiment, ROM305may store a boot-routine and other static data and RAM310may store an operating system (not shown), applications312, and protocol stack314. In an advantageous embodiment, ROM305and RAM310may comprise a single electronically erasable memory, such as a Flash memory, that is used in conjunction with a conventional RAM memory that is used to store dynamic data. Applications312in memory may include a social presence application (i.e., RCS Presence) that interacts with carrier SP server150, an IP multimedia subsystem (IMS) framework that delivers IP multimedia services, a Calendar application that communicates with calendar server160, and specific Social Network Site (SNS) applications (e.g., Facebook, Twitter), and the like that enable mobile phone120to exchange SP information with mobile phones used by other subscribers.

Importantly, applications312in memory may include a browser application that is executed under control of CPU315in order to exchange and process the enhanced state information according to the principles of the present disclosure. Thus, CPU315performs the functions described herein for both sending device browser application215in sending user device210and receiving device browser application255in receiving user device250.

Mobile phone120further comprises SIM card interface350, USB interface355, GPS receiver360, Bluetooth (BT) transceiver365, WiFi (or WLAN) transceiver370, speaker and microphone circuitry block375, keyboard380, display385, and camera390. In some embodiment, keyboard380and display385may be implemented together as a touch screen display.

CPU315is responsible for the overall operation of mobile phone120. In an exemplary embodiment, CPU315executes applications312and protocol stack314. CPU315runs the application layer and a wide variety of applications may be run in a smart phone implementation. Applications312may include audio, video, browser, and image/graphics applications. CPU315may run applications312that support various audio formats such as MP3, MP4, WAV, and rm. CPU315may run image applications312that support JPEG image formats and video applications312that support video formats (e.g., MPEG-1to MPEG-5). CPU315may support various operating systems (not shown), such as Symbian, java, android, RT-Linux, Palm, and the like. For time critical applications, CPU315runs a real-time operating system (RTOS). In addition to the physical layer, there are other layers, including protocol stack314, that enable mobile phone120to work with a network base station. In an exemplary embodiment, protocol stack314is ported on CPU315.

DAC/ADC circuitry block325converts analog speech signals to digital signals, and vice versa, in mobile phone120. In the transmit path, the ADC-converted digital signal is sent to a speech coder. Various types of ADCs are available, including sigma delta type. Automatic gain control (AGC) and automatic frequency control (AFC) are used in the receive path to control gain and frequency. AGC helps maintain satisfactory DAC performance by keepings signals within the dynamic range of the DAC circuits. AFC keeps frequency error within limit to achieve better receiver performance.

Baseband (BB) circuitry block330may be implemented as part of DSP320, which executes many of the baseband processing functions (i.e., physical layer, Layer 1, or L1 functions). BB circuitry block300may be ported on DSP320to meet the latency and power requirements of mobile phone120. BB circuitry block330converts voice and data to be carried over the air interface to I/Q baseband signals.

BB circuitry block330may change from modem to modem for various air interface standards, such as GSM, CDMA, Wimax, LTE, HSPA, and others. BB circuitry block330is often referred to as the physical layer, or Layer 1, or L1. For mobile phones that work on GSM networks, the baseband part (Layer 1) running on DSP320and the protocol stack314running on CPU315are based on the GSM standard. For CDMA mobile phones, the Layer 1 and protocol stack314are based on the CDMA standard, and so on, for the LTE and HSPA standards-based mobile phones.

For speech or audio inputs, codec circuitry block335may compress and decompress the signal to match the data rate to the frame in which the data is sent. By way of example, codec circuitry block335may convert speech at an 8 KHz sampling rate to a 13 kbps rate for a full rate speech traffic channel. To do this, a residually excited linear predictive coder (RELP) speech coder may be which compresses 260 bits into a 20 millisecond duration to achieve a 13 kbps rate.

The baseband or physical layer adds redundant bits to enable error detection as well as error correction. Error detection may be obtained with CRC and error correction using forward error correction techniques, such as a convolutional encoder (used in transmitter path) and a Viterbi decoder (used in receive path). Interleaving may be done for the data, which helps in spreading the error over time, thereby helping the receiver de-interleave and decode the frame correctly.

RF circuitry block340includes an RF up-converter and an RF down-converter. For a GSM system, the RF up-converter converts modulated baseband signals (I and Q) either at zero intermediate frequency (IF) or some IF to RF frequency (890-915 MHz). The RF down-converter converts RF signals (935 to 960 MHz) to baseband signals (I and Q). For a GSM system, GMSK modulation is used.

Antenna395is a metallic object that converts and electro-magnetic signal to and electric signal and vice versa. Commonly used antennas may include a helix type, a planar inverted F-type, a whip, or a patch type. Microstrip patch type antennas are popular among mobile phones due to small size, easy integration on a printed circuit board and multi-frequency band of operation. In a preferred embodiment of mobile phone120, antenna395may support different wire-area standards, including GSM, CDMA, LTE, and WiMAX, as well as short-range standards, including WiFi (WLAN), Bluetooth, and so on.

If antenna395comprises only one antenna used for both transmit and receive operations at different times, the TX/RX switch345couples both the transmit (TX) path and the receive (RX) path to antenna395at different times. TX/RX switch345is controlled automatically by DSP320based on a GSM frame structure with respect to the physical slot allocated for that particular GSM mobile phone in both the downlink and the uplink. For frequency division duplexing (FDD) systems, TX/RX switch345may be implement as a diplexer that acts as filter to separate various frequency bands.

Mobile phone120provides connectivity with laptops or other devices using WiFi (or WLAN) transceiver370, BT transceiver365, and universal serial bus (USB) interface355. Mobile phone120also uses GPS receiver360in applications312that require position information. If mobile phone120is a conventional smart phone, applications312may include many popular applications, such as Facebook, Twitter, a browser, and numerous games that come pre-installed with mobile phone120.

Speaker and microphone circuitry block375comprises microphone circuitry (or mic) that converts acoustic energy (i.e., air pressure changes caused by speech or other sounds) to electrical signals for subsequent processing. Speaker and microphone375further comprises speaker circuitry that converts an electrical audio signal to an audible signal (pressure changes) for human hearing. The speaker circuitry may include an audio amplifier to get required amplification of the audio signal and may further include a volume control circuit to change (increase or decrease) the amplitude of the audio signal.

Mobile phone120preferably includes camera390. Presently, almost all mobile phones feature a camera module. Camera390may comprise a 12 megapixel, 14 megapixel, or a 41 megapixel camera.

Display385may comprise, by way of example, a liquid crystal display (LCD), a thin-film transistor (TFT) screen, and organic light emitting diode (OLED) display, a thin film diode (TFD) display, or a touch screen of capacitive and resistive type.

In a simple embodiment, keypad380may comprise a simple matrix type keypad that contains numeric digits (0 to 9), alphabetic characters (A to Z), special characters, and specific function keys. In a more advanced embodiment for a smart phone implementation, keypad380may be implemented in the mobile phone software, so that keyboard380appears on display385and is operated by the user using the touch of a finger tip.

InFIGS. 4A and 4B,FIG. 5andFIG. 6, the methods described find the context text from the web page700on the transferring device, get HitTestResults710based on the current viewport rectangle of the transferring device, and scan through the text nodes of HitTestResult710, while ignoring fixed-position text nodes. For each text node, the method scans through the InlineTextBoxes of each text mode and determines the one closest to the top-left corner of the viewing rectangle705among all the HitTestResults710as shown inFIG. 7. The distance function is 10*Y+X gives nodes close to top-right some advantage. Based on the target text node found above, the method determines the first long-enough paragraph as a candidate paragraph. Starting from the first InlineTextBox in a candidate paragraph, the method finds the sentences with long-enough text and uses these sentences as final context text.

If a webpage has mostly images, then the methods described get HitTestResults710based on the current viewport rectangle, scan through the image elements of HitTestResult710, while ignoring fixed-position images. The methods determine the image element closest to the top-left corner715of the viewing rectangle705. Again, the distance function is 10*Y+X, giving nodes close to top-right some advantage. The method uses the imageSourceURL as the final context text.

InFIGS. 4A and 4B,FIG. 5andFIG. 6, the described methods use a combination of text search and coordinates adjustments when restoring scroll position on the receiving device. There is no need to do a text search if the original scroll position is 0. Otherwise, the methods perform a text search on the web content or source URLs of images based on the original text source. A text match may be based on exact match or a degree of similarity match. The methods also perform an additional adjustment based on the position of the original text relative to the view.

FIGS. 4A and 4Bare a flow diagram illustrating gathering and transmitting of browser state information by sending device browser application215in sending user device210according to an embodiment of the disclosure. Initially, sending device browser application215identifies nodes in the current viewport rectangle of the browser screen. The nodes are stored in the record HitTestResults based on current viewport rectangle (step405).

For each node in HitTestResults (step410), sending device browser application215determines if the node is a text node (step415). If the node is not a text node (No in415), then sending device browser application215examines the next node in HitTestResults (step410). If the node is a text node (Yes in415), then sending device browser application215determines if the text node has a fixed position (step420). If the text node does have a fixed position (Yes in420), then sending device browser application215examines the next node (step410). If the text node does not have a fixed position (No in420), then sending device browser application215determines, for each in-line text box in the node, which in-line text box is closest to the top-left of the viewport rectangle (step425).

Sending device browser application215then determines if the last node or in-line text box has been reached (step430). If not, (No in430), sending device browser application215examines the next node in HitTestResults (step410). If the last node/in-line text box has been reached, sending device browser application215ends the search loop inFIG. 4A(step435) and moves to item440inFIG. 4B.

Next, sending device browser application215sets the selection to the in-line text box (step440). Sending device browser application215then determines if the text in the selection is long enough (step445). If the text is not long enough (No in445), sending device browser application215replaces the selection with the next paragraph (step450) and returns to step445. If the text is long enough (Yes in445), sending device browser application215uses the first in-line text box of the first test node in the selection above to be the target text and the target context text (step455).

Sending device browser application215then determines if the context text is long enough (step460). If the context text is not long enough (No in445), sending device browser application215expands the target contest text to the next sentence (step465) and returns to step455. If the context text is long enough (Yes in445), sending device browser application215determines that it has found the target context text, the target text, and the position of the target text (step470). This is part of the enhance browser state information that is transferred to receiving device browser application255.

FIG. 5is a flow diagram illustrating gathering and transmitting of browser state information by sending device browser application215in sending user device210according to another embodiment of the disclosure. Initially, sending device browser application215identifies nodes in the current viewport rectangle of the browser screen. The nodes are stored in the record HitTestResults based on current viewport rectangle (step505).

For each node in HitTestResults (step510), sending device browser application215determines if the node is an image element (step515). If the node is not an image element (No in515), then sending device browser application215examines the next node in HitTestResults (step510). If the node is an image element (Yes in515), then sending device browser application215determines if the image element has a fixed position (step520). If the image element does have a fixed position (Yes in520), then sending device browser application215examines the next node (step510). If the image element does not have a fixed position (No in520), then sending device browser application215determines which image element is closest to the top-left of the viewport rectangle (step525). Sending device browser application215ends the search loop (step530) and determines that is has found the target text to be the image source URL and the position of the image element.

FIG. 6is a flow diagram illustrating receiving and processing browser state information in a user device according to one embodiment of the disclosure. Initially, receiving device browser application255determines if the data field scrollViewPosition from TABLE 1 is equal to 0 (step605). If not (No in605), then receiving device browser application255determines if data field IsImage from TABLE 1 is TRUE (step610).

If the IsImage data field is TRUE (Yes in610), then for each image element in the document (step560), receiving device browser application255determines if the source URL is the same as the data field scrollToText from TABLE 1 (step625). If not (No in625), receiving device browser application255returns to step620. If the source URL is the same as the data field scrollToText (Yes in625), then receiving device browser application255scrolls to the image element and offsets by the value in data field scrollToTextPositionInView from TABLE 1 (step630).

If the IsImage data field is not TRUE (No in610), then receiving device browser application255determines the value in data field scrollToContextText in TABLE 1 using the value in the rangeOfString( ) data field (step640). If a next selection is not found (No in645), receiving device browser application255ends the process. If a next selection is found (Yes in645), receiving device browser application255scrolls to the selection and offsets by the value in the data field scrollToTextPositionInView (step650).

It will be appreciated that various embodiments of the present disclosure as described in the specification may be realized in the form of hardware, software or a combination of hardware and software. The software may be stored in a non-transitory computer readable storage medium configured to store one or more application programs (software modules). The application programs comprise computer-executable instructions that cause a processor in an electronic device to perform a method of the present disclosure. Accordingly, exemplary embodiments provide a program comprising code for implementing an apparatus or a method as described and claimed herein and a non-transitory machine-readable storage storing such a program. Alternatively, the functionality herein may be implemented by as an Integrated Circuit (ID) or any combination of one or more processors and ICs.

The computer-executable instructions may be stored in the form of volatile or non-volatile storage such as, for example, a storage device like a read-only memory (ROM), random access memory (RAM), memory chips, device or integrated circuits or on an optically or magnetically readable medium such as, for example, a compact disk (CD), digital versatile disk (DVD), magnetic disk, magnetic tape, or the like. It will be appreciated that the storage devices and storage media are various embodiments of non-transitory machine-readable storage that are suitable for storing a program or programs comprising instructions that, when executed, implement various embodiments of the present disclosure.