A device, system, and method are directed towards enabling a network application to process and respond to requests from client devices. A rules engine receives a page, evaluates a set of rules, and performs actions based on the rules. Actions may modify the page or perform other actions affecting the environment. A rules engine may also process rules prior to processing pages, in order to optimize subsequent evaluation of the rules.