Method and system to display a pop-up window when a user leaves a website

A method and system to display a pop-up window when a user leaves a website are disclosed. A user accesses a website with a web browser. When a web page from the website is loaded into the user's browser, a client-side variable is set to a particular value, such as the current time. When the web page from the website is unloaded from the browser, a hidden pop-up window is loaded. The hidden pop-up window is programmed to sleep and then check the value of the client-side variable. A change in the value of the client-side variable indicates a new web page from the same web server has been loaded into the web browser and the user has not left the website. However, if a web page from a different web server is loaded into the browser, then the value of the client-side variable remains unchanged. Consequently, when the hidden pop-up window awakes and checks the value of the client-side variable, the pop-up window can determine whether the user has left the original website. If the user has left the original website, the pop-up window is displayed. If not, the pop-up window is unloaded before ever being displayed to the user.

FIELD OF THE INVENTION

The present invention relates generally to the field of graphical user interfaces for computing, and more particularly to a method and system to display a pop-up window when a user leaves a particular website.

BACKGROUND OF THE INVENTION

Online retailers have come up with many clever methods to advertise their goods and services on the World Wide Web via the Internet. One such scheme is referred to as a pop-up window. A pop-up window, sometimes referred to as a pop-up advertisement, is a window that suddenly appears (pops up) when a user takes a particular action, such as when a user selects a link with a mouse click or presses a special function key on a keyboard. Generally, pop-up windows are one of two types. A pop-up advertisement is a window that appears on top of the active window, thereby disrupting the user by blocking the view of the active window. A pop-under advertisement is a pop-up window that appears underneath the active window so that it does not disturb the user.

While pop-up windows are primarily used for advertising, there are a variety of other uses for pop-up windows. For example, an online retailer might use a pop-up window to present a survey, or otherwise solicit information, from the user.

SUMMARY OF THE INVENTION

In accordance with one aspect of the present invention, there is provided a method and system to display a pop-up window when a user leaves a website. Accordingly, a client-side variable is set with a particular value each time a user interacts in a particular manner with a particular website. In addition, a pop-up window is loaded, but not displayed. The pop-up window is programmed to sleep for a predetermined length of time, and then, wake up and check the value of the client-side variable. If the value of the client side variable has not changed while the pop-up window was sleeping, then the pop-up window is displayed.

DETAILED DESCRIPTION

A method and system to display a pop-up window when a user leaves a website are described. In the following description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the present invention. It will be evident, however, to one skilled in the art that the present invention may be practiced without these specific details.

FIG. 1illustrates an exemplary client-server network environment10in which the present invention might be implemented. The client-server network environment10includes a client PC12, coupled to two different servers, a server XYZ14and a server ABC16, via the Internet18. The server XYZ14executes server software including, but not limited to, web server software to host a website with a World Wide Web domain name of www.xyz.com. Similarly, the server ABC16executes server software including, but not limited to, web server software to host a website with a World Wide Web domain name of www.abc.com. A user of the client PC12utilizes a web browser application executing on the client PC12to access server documents (e.g., web pages) stored on the server XYZ14and the server ABC16.

In accordance with an embodiment of the present invention, a user browsing web pages from one website, for example the XYZ web site hosted on the server XYZ14, will be presented with a pop-up window if the user leaves the XYZ web site. For example, if the user selects a link to the ABC web site, hosted on the server ABC14, a pop-up window will be displayed to the user. The pop-up window might serve one of any number of purposes, including presenting the user with a survey, and in particular, inquiring of the user the reason for leaving the XYZ web site.

FIG. 2illustrates a computer display screen20displaying a pop-up window22in a type of graphical user interface referred to as a windowing system. The present invention is independent of any particular type of windowing system and may be implemented to work with any operating system utilizing a windowing system, including the well known Microsoft Windows® operating system. For one embodiment of the invention, the windowing system allows individual programs to be separately executed and displayed in individual windows on the display screen20. For example, as illustrated inFIG. 2, a web browser program is executing in the background window24and in the pop-up window22.

For one embodiment of the present invention, a user browses a website by entering a uniform resource locator (URL) (e.g., http://www.xyz.com) into the address bar of the web browser program executing in the window14. The user can also navigate by selecting different internal and external links on the individual web pages of the XYZ website. An internal link is a link to another web page on the XYZ website, or another location on the same web page of the XYZ website. An external link is a link to a web page of another website, for example, the ABC website (e.g., http://www.abc.com). In addition, most web browser programs have “back” and “forward” buttons that allow the user to navigate back and forth between previously loaded web pages.

For one embodiment of the present invention, so long as the user stays on the XYZ website by selecting internal links to the XYZ website, or entering URL addresses of the XYZ website, no pop-up window22will be displayed. However, when the user selects an external link, or enters a URL address external to the XYZ website, a pop-up window22is displayed. In addition, if the user closes the web browser all together, a pop-up window will be displayed. One advantage of the present invention is that the developer is given control over exactly when a pop-up window is displayed and pop-up windows are not indiscriminately displayed during the user's web browsing session.

FIG. 3illustrates a timing and event diagram for one embodiment of a method to display a pop-up window when a user leaves a website. InFIG. 3, the horizontal timeline26stretching across the top of the figure represents time and is used to illustrate the relationship between different events with respect to time. For example, it can be seen fromFIG. 3that at time0, a web browser event occurs (e.g., load page) and the value of the client-side variable is set to 0. For purposes of describing the invention, it will be appreciated that the particular units used to measure time are unimportant, and therefore not given.

The horizontal line labeled “CLIENT-SIDE VARIABLE VALUE”28stretching horizontally across the figure illustrates the value of the client-side variable over time. For example, it can be seen fromFIG. 3, that the value of the client-side variable is originally set to 0 at time0and then the value is changed to 5 at time5. Similarly, the horizontal line labeled “WEB BROWSER EVENT”30represents an event timeline for web browser events. The horizontal line labeled “POP-UP WINDOW EVENT”32illustrates the pop-up window events associated with the pop-up windows42,44, and46. For example, fromFIG. 3, it can be seen that hidden pop-up window42is loaded at time3and sleeps from the time it is loaded until time6, when it checks the value of the client-side variable and is unloaded.

For one embodiment of the present invention, a user enters a URL, for example, http://www.xyz.com, into the address bar of a web browser executing in a window24on the display screen20. Accordingly, at time0, a web page34from the XYZ website is loaded into the web browser. When the web page34is loaded at time0, a client-side variable is also set to a particular value. For one embodiment of the invention, and as illustrated inFIG. 3, the variable is set to a value corresponding to the current time. For example, at time0, the value of the variable is set to 0.

Next, when the user selects the internal XYZ link on the web page34, the web browser requests a new web page36from the web server hosting the XYZ website. Accordingly, at time3, the web browser unloads the original web page34and, at the same time, the windowing system loads a hidden pop-up window as indicated by the dotted-line box with reference number42. The hidden pop-up window42is not displayed to the user and is programmed to immediately sleep for a predetermined amount of time. As illustrated inFIG. 3, the hidden pop-up window42sleeps until time6. However, at time5, the web browser executing in window24completes the loading of the new web page36. When the XYZ web server14serves the new web page36, the client-side variable is also set to the current time when the new web page36is loaded. Consequently, at time5, the value of the client-side variable is set to 5.

At time6, when the pop-up window42awakes and checks the value of the client-side variable, the pop-up window determines that the value of the client-side variable has changed from 0 to 5. For one embodiment of the present invention, the pop-up window42is programmed to exit, or unload, if the value of the client-side variable has changed since the time when the pop-up window was originally loaded. For one embodiment of the present invention, when the pop-up window is initially created, the current value of the client-side variable is passed into the pop-up window. As illustrated inFIG. 3, when the pop-up window checks the value of the client-side variable at time6, the pop-up window determines that the value of the client-side variable has changed from 0 to 5 and consequently, the pop-up window34is unloaded and never displayed to the user.

When the user selects the internal XYZ link on web page36, the web browser executing in window24requests a new web page38from the web server hosting the XYZ website. Accordingly, at time8, the web browser unloads the current web page36and the windowing system once again loads a hidden pop-up window44. Again, the pop-up window44is programmed to sleep for a predetermined amount of time. For example, as illustrated inFIG. 3, the pop-up window44is programmed to sleep for three units of time, until time11, before checking the value of the client-side variable. At time10, the web browser completes the loading of the new web page38served by the web server14hosting the XYZ website. At time10, when the new web page30is loaded, the client-side variable is also set to 10, the current time. Then, at time11, the pop-up window44checks the value of the client-side variable and determines the value to be 10. Because the value of the client-side variable was changed from 5 to 10 when the new web page38was loaded, indicating that the new web page38was from the XYZ web server, the pop-up window44unloads before ever being displayed to the user.

When the user selects the external ABC link on web page38, the web browser executing in window24requests a new web page40from the web server16hosting the ABC website. Accordingly, at time13, the web browser unloads the current web page38and the windowing system once again loads a hidden pop-up window20. The hidden pop-up window20is programmed to sleep for a predetermined amount of time before checking the value of the client-side variable. At time15, the web browser completes loading of the new web page40served by the server16hosting the ABC website. However, because the new web page40is from the ABC web server, and not the XYZ web server, the value of the client-side variable is not changed, but instead, the value of the client-side variable remains 10. For one embodiment of the invention, only the XYZ web server, or a web server designated by the XYZ web server, can access (e.g., read or write) the client-side variable. Therefore, at time16, when the hidden pop-up window20awakes and checks the value of the client-side variable, it determines that the client-side variable has not changed from the time the hidden pop-up window20was loaded. Consequently, the pop-up window20is displayed to the user at time16.

In the example given with reference toFIG. 3, the pop-up window makes a comparison of the value of the client-side variable at the time the pop-up window is generated with the value of the client-side variable when the pop-up window wakes up. However, in an alternative embodiment, the pop-up window is programmed to compare the actual time that the pop-up window was created with the value of the client-side variable when the pop-up window wakes up. For example, at time3when the pop-up window42is loaded, the pop-up window checks the time and stores it to compare it with the client-side variable when the pop-up window awakes. Therefore, at time3, the pop-up window would store the value3. Consequently, at time6when the pop-up window checks the time stored in the client-side variable, it will determine that the time is later than the time when the pop-up window42was originally loaded because the client-side variable was changed from 1 to 5 when web page36was loaded into the web browser.

For one embodiment of the present invention, the client-side variable is an Internet cookie and the XYZ web server14hosting the XYZ website specifies a range of URLs for which the client-side variable is valid and accessible. For example, when the XYZ web server initially creates the cookie, the XYZ web server can specify what other web servers can access the cookie. A web server that can access the cookie can change the value of the cookie when it serves a web page to the web browser. Consequently, the pop-up window will determine that the value of the cookie has changed and unload before becoming visible to the user. While an Internet cookie is one example of a client-side variable, it will be appreciated that alternative embodiments might utilize mechanisms other than Internet cookies as a client-side variable. For example, a file or a database on the client could be used in place of an Internet cookie.

For one embodiment of the present invention, JavaScript® event handlers are used to take a particular action when a web browser event or window event occurs, such as a web page being loaded or unloaded. For example, the JavaScript® “on Load” event handler can be used to set the value of the client-side variable when a web page is loaded. Similarly, the JavaScript “on Unload” event handler can be used to generate a hidden pop-up window when a web page is unloaded.

One advantage of the present invention is the increased flexibility and control over the timing of the pop-up window. As illustrated inFIG. 4, by manipulating the length of time a pop-up window sleeps before checking the value of the client-side variable, a web-site developer can control when a pop-up window is displayed to a user. For example, a website developer can increase the pop-up window sleep time so that the pop-up window checks the value of the client-side variable after the user has left the website and then returned to the website. In such case, because the user has returned to the website, no pop-up window is displayed.

FIG. 4illustrates a timing and event diagram for one embodiment of a method to display a pop-up window when a user leaves a website.FIG. 4is very similar toFIG. 3, however,FIG. 4illustrates the effect of increasing the sleep time of the pop-up window. For example, as illustrated inFIG. 4, by increasing the sleep time of the pop-up window a user is provided with more time to return to the initial website before a pop-up window is displayed.

As illustrated inFIG. 4, for one embodiment of the present invention, a user enters a URL, for example, http://www.xyz.com, into the address bar of a web browser executing in a window24on the display screen20. Accordingly, at time0, a web page46from the XYZ website is loaded into the web browser. When the web page46is loaded at time0, a client-side variable is also set to a particular value. For one embodiment of the invention, and as illustrated inFIG. 4, the variable is set to a value corresponding to the current time. For example, at time0, the value of the variable is set to 0.

Next, when the user selects the internal XYZ link on the web page46, the web browser requests a new web page48from the web server14hosting the XYZ website. Accordingly, at time3, the web browser unloads the original web page46and, at the same time, the windowing system loads a hidden pop-up window as indicated by the dotted-line box with reference number54. The hidden pop-up window54is hidden and not displayed to the user, and is programmed to immediately sleep for a predetermined amount of time. In contrast to the example presented inFIG. 3, the sleep time is eight units of time for the example illustrated inFIG. 4. As illustrated inFIG. 4, the hidden pop-up window54sleeps until time11.

At time5, the web browser executing in window24completes the loading of the new web page48. When the XYZ web server serves the new web page48, the client-side variable is also set to the current time when the new web page48is loaded. Consequently, at time5, the value of the client-side variable is set to 5.

When the user selects the external ABC link on web page48, the web browser executing in window24requests a new web page50from the web server16hosting the ABC website. Accordingly, at time8, the web browser unloads the current web page48and the windowing system once again loads a hidden pop-up window56. Again, the pop-up window56is programmed to sleep for a predetermined amount of time. For example, as illustrated inFIG. 4, the pop-up window56is programmed to sleep for eight units of time, until time16, before checking the value of the client-side variable. From time8until time11, two hidden pop-up windows are executing in the background of the window-based operating system.

At time10, the web browser completes the loading of the new web page50served by the web server16hosting the ABC website. At time10, when the new web page50is loaded, the client-side variable is not changed. Because the ABC server16cannot access the client-side variable, the value of the client-side variable does not change when the ABC web page50is loaded. Then, at time11, the pop-up window44checks the value of the client-side variable and determines the value to be 5. Because the value of the client-side variable was changed from 0 to 5 when the second XYZ web page48was loaded, indicating that the second web page38was from the XYZ web server16, the pop-up window44unloads before ever being displayed to the user.

When the user selects the external XYZ link on web page50, the web browser executing in window24requests a new web page52from the web server14hosting the XYZ website. Accordingly, at time13, the web browser unloads the current web page50and the windowing system once again loads a hidden pop-up window58. The hidden pop-up window58is programmed to sleep for a predetermined amount of time before checking the value of the client-side variable. At time15, the web browser completes loading of the new web page52served by the server14hosting the XYZ website. Because the new web page52is from the XYZ web server, the value of the client-side variable is changed from 5 to the current time15. At time16, the pop-up window56loaded at time8wakes up and checks the value of the client-side variable. Because the value changed from 5 to 15 at time15, the hidden pop-up window is unloaded before ever being displayed to the user. Consequently, despite the user navigating away from the XYZ website by selecting the ABC link to the ABC web page50, the pop-up window56is not displayed to the user because the user returned to the XYZ website before the pop-up window checked the value of the client-side variable.

FIG. 5illustrates a flowchart illustrating a method60, according to an exemplary embodiment of the present invention, to display a pop-up window when a user leaves a website. At operation62, a web page from particular website is loaded into a user's web browser and a client-side variable is set with a specific value.

Next, the user requests a new web page and, at operation64, the previously loaded web page is unloaded from the user's web browser and a hidden pop-up window is loaded by the windowing system. The hidden pop-up window sleeps for a predetermined amount of time at operation66. At operation68, the sleeping, hidden window awakes.

Next, at operation70, the hidden pop-up window determines whether the value of the client-side variable has changed. If the value has changed, indicating that the new web page was loaded from the particular website that originally set the client-side variable, then the pop-up window is unloaded without ever being displayed to the user. However, if the value has not changed since the hidden pop-up window was loaded, then the pop-up window is displayed to the user at operation74. In this case, because loading the new web page into the web browser did not also trigger a change in the value of the client-side variable, the new web page must not have been from the website that originally set the value of the client-side variable. Therefore, according to the method60, it is assumed that the user has left the original website.

For one embodiment of the present invention, a second client-side variable tracks the number of pop-up windows actually displayed to the user. For example, when a pop-up window is displayed to the user, the value of the second client-side variable is incremented by one. A pop-up window can then be programmed to check the value of the second client-side variable to determine how many times a pop-up window has been displayed. If the value of the second client-side variable exceeds some predetermined threshold number then the pop-up window can be unloaded rather than displayed to the user. The second client-side variable (not shown) may be stored and modified in a manner similar to the above-described time client-side variable, and the predetermined special number may similarly be stored on the client-side. In an alternative embodiment, the value of the second client-side variable is checked prior to loading the hidden pop-up window. If the value of the second client-side variable exceeds some predetermined threshold number, then the pop-up window is never loaded.

FIG. 6illustrates an embodiment of a system to display a pop-up window when a user leaves a website. The system76illustrated inFIG. 6includes both client84and server78components. For example, the system76includes Internet server78with server documents80and web server82. In addition, the system76includes a client component84. The client84includes a document viewer86(e.g., a web browser), client-side state data88, an operating system90with a windowing system92, an input/output system94, an event detection and state logic96, a system time module98, and a state comparator logic100.

For one embodiment of the invention, the event detection and state logic96detects events, such as the loading and unloading of server documents80into a web browser86, and sets a client-side variable88representing the state of the system based on the events detected. For example, the event detection and state logic78may set a client-side variable upon detection of a web-browser interaction with a particular website. A web browser interaction may include, but is not limited to, the unloading and loading of web documents80in a web browser86executing in a window of a windowing system92.

For one embodiment of the invention, the state comparator logic100compares the client-side state data88of the system76at different times to determine whether a user has left a particular website. For example, the state comparator logic80may compare the value of a client-side variable that can only be modified by a particular web server82or Internet server78. For one embodiment, the client-side variable may be set with an arbitrary value, such as a character sequence or a number. However, more intelligent determinations can be made about the user's web browsing activity if the client-side value is a timestamp, and is set with the current time each time a qualifying event occurs. For example, the state comparator logic100may check the value of the client-side state variable at two different times to determine whether the value has changed. If the variable is a timestamp, the state comparator logic100can determine the amount of time that has gone by between the unloading of a web page and the loading of another web page from the same website.

The windowing system92includes window loading logic to control the loading and unloading, as well as the hiding and displaying, of pop-up windows. Accordingly, the windowing system92may cause a previously loaded, but hidden, pop-up window to be displayed if the state comparator logic100determines the value of the client-side variable has not changed. For one embodiment of the invention, when the state comparator logic100does not detect a change in the client-side variable after a particular event has been detected (e.g., a web document unloaded), then a previously loaded, but hidden pop-up window is displayed. Similarly, for one embodiment, if a change is detected in the client-side variable, a previously loaded, but hidden pop-up window is unloaded without ever being displayed. In alternative embodiments, events other than the loading and unloading of web documents may trigger the display of a previously loaded, but hidden, pop-up window. For example, other events may trigger a change in the client-side variable indicating that the user has loaded a new web document from the same website and accordingly, has not left the website.

FIG. 7shows a diagrammatic representation of a machine in the exemplary form of a computer system200within which a set of instructions, for causing the machine to perform any one of the methodologies discussed above, may be executed. In alternative embodiments, the machine may comprise a network router, a network switch, a network bridge, personal digital assistant (PDA), a cellular telephone, a web appliance or any machine capable of executing a sequence of instructions that specify actions to be taken by that machine.

The computer system200includes a processor202, a main memory204and a static memory206, which communicate with each other via a bus208. The computer system200may further include a video display unit210(e.g., a liquid crystal display (LCD) or cathode ray tube (CRT)). The computer system200also includes an alphanumeric input device212(e.g. a keyboard), a cursor control device214(e.g. a mouse) a disk drive unit216, a signal generation device218(e.g. a speaker) and a network interface device220.

The disk drive unit216includes a machine-readable medium222on which is stored a set of instructions (software)224embodying any one, or all, of the methodologies described above. The software224is also shown to reside, completely or at least partially, within the main memory204and/or within the processor202. The software224may further be transmitted or received via the network interface device220. For the purposes of this specification, the term “machine-readable medium” shall be taken to include any medium which is capable of storing or encoding a sequence of instructions for execution by the machine and that cause the machine to perform any one of the methodologies of the present invention. The term “machine-readable medium” shall accordingly be taken to include, but not be limited to; solid-state memories, optical and magnetic disks, and carriers wave signals.

Thus, a method and system to display a pop-up window when a user leaves a website are disclosed. It will be evident that various modifications and changes may be made to these embodiments without departing from the broader spirit and scope of the invention. Accordingly, the specification and drawings are to be regarded in an illustrative rather than a restrictive sense. For example, the invention may also be applied in a peer-to-peer computing environment.