1. A content delivery network (CDN) having a plurality of points of presence (POPs), comprising: one or more processors for executing instructions to: receive a request for web content at a first POP from an end user for content stored on an origin server, wherein: the web content includes a plurality of resource links, the first POP is part of the plurality of POPs, and the first POP comprises: an front-end optimization engine, and a front-end cache; identify a second POP that is located closer to the origin server than the first POP, wherein: the second POP is part of the plurality of POPs, and the second POP comprises: a back-end optimization engine, and a back-end cache; and rewrite a resource link of the plurality of resource links of the web content, wherein the rewritten resource link is changed to reference the second POP, another POP from the plurality of POPs or the origin server; and one or more storage media for retaining the instructions.