1. A computer-implemented method, comprising: loading a webpage on a device; accessing a factor when the webpage is loading, wherein factors include a device-specific attribute or content of the webpage; determining a rule; and executing web code selected using the factor and the rule.