An apparatus and method for customizing a web page comprising components and steps for analyzing a template of the web page to obtain block elements constituting the web page template, selecting a block element to be customized, and setting an optimization and/or differentiating policy for the selected block element, thus customizing the selected block element, and storing the customized policy correlated to a selector. The invention also provides an apparatus for optimizing and/or differentiating a web page based on customized policies, which are stored correlated to selectors and web page templates, comprising a web page object selector for comparing the visited original web page and the selectors associated with the customized policies to determine the portion in the web page matched with a selector; and a policy enforcer for enforcing a corresponding policy on said matched portion, thus displaying an optimized and differentiated web page.