Re: Turning beta into production

From: Date: Mon, 31 Dec 2012 04:30:38 +0000
Subject: Re: Turning beta into production
References: 1 2 3 4  Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-15179@lists.php.net to get a copy of this message
On Dec 30, 2012, at 7:17 PM, Sherif Ramadan wrote: > Now for the bad news: > > 1) Prototype actually requires a lot more requests per page view than the existing site. (Upon > preliminary testing this about double the number of requests on average). The main reason for this > seems to be that the prototype is using one data URI per image in the footer where we display the > PHP elephant plushies. This is actually very bad, because data URIs generally gon't get cached > by the User Agent. This could mean a lot of extra HTTP requests per page view increasing load with > minimal benefit. I highly suggest we refactor this to use a single PNG file as a sprite image that > can be cached by the UA and with a little CSS it can work any necessary effect magic needed. I think you are misunderstanding how data URIs work. We make one JSON request to get N elephant images. We then place these into the DOM using data URIs specifically to avoid the request overhead you are talking about. If your network pane reports ~40 requests, then about half of these are not actually http requests. http://en.wikipedia.org/wiki/Data_URI_scheme#Advantages Stew

« previous php.webmaster (#15179) next »