1. A method, comprising: at a client device: presenting content to a user; detecting behavior of the user with respect to the content; if the detected behavior meets one or more predefined criteria, downloading a first plurality of resources, wherein the first plurality of resources is at least a subset of resources specified in a resources list; if the detected behavior does not meet the predefined criteria, downloading a second plurality of resources, wherein the second plurality of resources is randomly selected from the resources specified in the resources list; receiving a user input selecting an online application; and in accordance with the user input selecting the online application, loading respective downloaded resources that correspond to the selected online application.