A method for updating webpage content, the method comprising: receiving, at a user device, a request to present a webpage; retrieving, from memory local to the user device, a template associated with the webpage and a plurality of content items to be included in the webpage, each content item having an event listener configured to indicate when the respective content item has been made visible on a screen of the user device or when the respective content item has been clicked or selected by the user, the event listeners being controlled by a controller associated with the template; causing the webpage to be presented on the user device using the retrieved template and the one or more content items; detecting when an event listener associated with a particular content item has fired and in response: transmitting, from the user device, a Remote Procedure Call (RPC) to a server associated with the webpage, wherein the RPC includes an identifier of the webpage and includes an indication of the template associated with the webpage, the RPC further indicating that the particular content item has been made visible on the screen of the user device or has been selected by the user; receiving a response to the RPC that includes at least one update to the webpage, wherein the at least one update is based on the indication in the RPC of the template associated with the webpage and on the indication Z that the particular content item has been made visible on the screen of the user device or has been selected by the user; and causing the webpage to be updated based on the response to the RPC. receiving, at a user device, a request to present a webpage; retrieving, from memory local to the user device, a template associated with the webpage and a plurality of content items to be included in the webpage, each content item having an event listener configured to indicate when the respective content item has been made visible on a screen of the user device or when the respective content item has been clicked or selected by the user, the event listeners being controlled by a controller associated with the template; causing the webpage to be presented on the user device using the retrieved template and the one or more content items; detecting when an event listener associated with a particular content item has fired and in response: transmitting, from the user device, a Remote Procedure Call (RPC) to a server associated with the webpage, wherein the RPC includes an identifier of the webpage and includes an indication of the template associated with the webpage, the RPC further indicating that the particular content item has been made visible on the screen of the user device or has been selected by the user; receiving a response to the RPC that includes at least one update to the webpage, wherein the at least one update is based on the indication in the RPC of the template associated with the webpage and on the indication Z that the particular content item has been made visible on the screen of the user device or has been selected by the user; and causing the webpage to be updated based on the response to the RPC. transmitting, from the user device, a Remote Procedure Call (RPC) to a server associated with the webpage, wherein the RPC includes an identifier of the webpage and includes an indication of the template associated with the webpage, the RPC further indicating that the particular content item has been made visible on the screen of the user device or has been selected by the user; receiving a response to the RPC that includes at least one update to the webpage, wherein the at least one update is based on the indication in the RPC of the template associated with the webpage and on the indication Z that the particular content item has been made visible on the screen of the user device or has been selected by the user; and causing the webpage to be updated based on the response to the RPC. <EOS>