A method for retrieving content associated with links, the method comprising: transmitting, from a user device to a server , a remote procedure call that requests content corresponding to a page to be presented on the user device; receiving, from the server, the content corresponding to the page and a mapping of one or more links included in the content corresponding to the page to one or more page types associated with each of the one or more links, wherein an event handler is inserted for each of the one or more links in the content corresponding to the page, by the user device or by the server, prior to causing the page to be presented on the user device, wherein the event handler comprises information or code specifying an action to be taken when a link is selected to determine the type of page associated with the selected link from the mapping; storing, on the user device, the received mapping; causing the content of the page to be presented on the user device; receiving a selection of one of the one or more links included in the content corresponding to the page; identifying a page type corresponding to the selected link based on the stored mapping, using the event handler; transmitting, to the server, a request for content associated with the selected link; causing user interface elements of a user interface associated with the identified page type to begin to be presented on the user device while waiting for the requested content from the server; and in response to receiving the requested content from the server, causing the received content to be presented within the user interface. transmitting, from a user device to a server , a remote procedure call that requests content corresponding to a page to be presented on the user device; receiving, from the server, the content corresponding to the page and a mapping of one or more links included in the content corresponding to the page to one or more page types associated with each of the one or more links, wherein an event handler is inserted for each of the one or more links in the content corresponding to the page, by the user device or by the server, prior to causing the page to be presented on the user device, wherein the event handler comprises information or code specifying an action to be taken when a link is selected to determine the type of page associated with the selected link from the mapping; storing, on the user device, the received mapping; causing the content of the page to be presented on the user device; receiving a selection of one of the one or more links included in the content corresponding to the page; identifying a page type corresponding to the selected link based on the stored mapping, using the event handler; transmitting, to the server, a request for content associated with the selected link; causing user interface elements of a user interface associated with the identified page type to begin to be presented on the user device while waiting for the requested content from the server; and in response to receiving the requested content from the server, causing the received content to be presented within the user interface. storing, on the user device, the received mapping; causing the content of the page to be presented on the user device; receiving a selection of one of the one or more links included in the content corresponding to the page; identifying a page type corresponding to the selected link based on the stored mapping, using the event handler; transmitting, to the server, a request for content associated with the selected link; causing user interface elements of a user interface associated with the identified page type to begin to be presented on the user device while waiting for the requested content from the server; and in response to receiving the requested content from the server, causing the received content to be presented within the user interface. <EOS>