1. A computer-implemented method performed by data processing apparatus, the method comprising: receiving a set of search results, wherein the set includes one or more search results that each include a native application deep link that instantiates an instance of a native application, wherein a native application generates environment instances for display on a user device within the native application, and the native application operates independent of a browser application that operates on the user device; selecting, prior to a user selection of a search result, one or more native application deep links from the search results; instantiating, for each native application deep link that is selected, a background instance of the native application to which the native application deep link corresponds; determining, in response to an occurrence of a background unload event, background instances of the native applications instantiated from the native application deep links and that were not brought to the foreground prior to the occurrence of the background unload event; and terminating each of the background instances of the native applications instantiated that were not brought to the foreground prior to the occurrence of the background unload event.