| Issue 30: | coolRunnings: support POST | |
| 2 people starred this issue and may be notified of changes. | Back to list |
If the number of image URLs exceeds the 4K querystring limit, not all images are sprited. use POST?
Sep 5, 2009
Project Member
#1
jaredhir...@yahoo.com
Sep 15, 2009
here's a thought: most sites will probably have one, or at most a few, base URLs for
images. What if we continue to use GET, but just include an option to abbreviate the
base URL in the GET call?
The ebay spriteme call, for example, gets considerably smaller:
Before:
"images":[
{"url":"http://pics.ebaystatic.com/aw/pics/globalHeader/imgHdrMainNavLft3.gif",
"top":10, "left":10},
{"url":"http://pics.ebaystatic.com/aw/pics/globalHeader/imgHdrMainNavRgt3.gif",
"top":75, "left":10},
{"url":"http://pics.ebaystatic.com/aw/pics/cmp/btn/btnFilmstripBgHoriz.gif",
"top":140, "left":10},
{"url":"http://pics.ebaystatic.com/aw/pics/buy/dailydeal/btnDDShowMe.gif",
"top":2560, "left":10},
{"url":"http://pics.ebaystatic.com/aw/pics/cmp/btn/sprbtnprimary.png", "top":2615,
"left":10},
{"url":"http://pics.ebaystatic.com/aw/pics/globalAssets/imgHPHdrLftYellow.gif",
"top":2905, "left":10},
{"url":"http://pics.ebaystatic.com/aw/pics/globalAssets/imgPanelLLGreyGrad.gif",
"top":2935, "left":10},
{"url":"http://pics.ebaystatic.com/aw/pics/globalHeader/imgHdrSearchLft.gif",
"top":2965, "left":10},
{"url":"http://pics.ebaystatic.com/aw/pics/globalHeader/imgHdrSearchRgt.gif",
"top":3035, "left":10},
{"url":"http://pics.ebaystatic.com/aw/pics/globalHeader/imgHdrCatsLft2.gif",
"top":3105, "left":10},
{"url":"http://pics.ebaystatic.com/aw/pics/globalHeader/imgHdrCatsRgt2.gif",
"top":3160, "left":10},
{"url":"http://pics.ebaystatic.com/aw/pics/globalHeader/imgHdrMainNavBgHighlight.gif", "top":3215,
"left":10}, {"url":"http://pics.ebaystatic.com/aw/pics/cmp/ui/sprpanelcrns.png",
"top":3280, "left":10},
{"url":"http://pics.ebaystatic.com/aw/pics/globalAssets/imgHPHdrRgtYellow.gif",
"top":3691, "left":10},
{"url":"http://pics.ebaystatic.com/aw/pics/globalAssets/imgPanelLRGreyGrad.gif",
"top":3721, "left":10}]}
after:
"abbr":[{"url1":"http://pics.ebaystatic.com/aw/pics"}],
"images":[
{"url":"url1/globalHeader/imgHdrMainNavLft3.gif", "top":10, "left":10},
{"url":"url1/globalHeader/imgHdrMainNavRgt3.gif", "top":75, "left":10},
{"url":"url1/cmp/btn/btnFilmstripBgHoriz.gif", "top":140, "left":10},
{"url":"url1/buy/dailydeal/btnDDShowMe.gif", "top":2560, "left":10},
{"url":"url1/cmp/btn/sprbtnprimary.png", "top":2615, "left":10},
{"url":"url1/globalAssets/imgHPHdrLftYellow.gif", "top":2905, "left":10},
{"url":"url1/globalAssets/imgPanelLLGreyGrad.gif", "top":2935, "left":10},
{"url":"url1/globalHeader/imgHdrSearchLft.gif", "top":2965, "left":10},
{"url":"url1/globalHeader/imgHdrSearchRgt.gif", "top":3035, "left":10},
{"url":"url1/globalHeader/imgHdrCatsLft2.gif", "top":3105, "left":10},
{"url":"url1/globalHeader/imgHdrCatsRgt2.gif", "top":3160, "left":10},
{"url":"url1/globalHeader/imgHdrMainNavBgHighlight.gif", "top":3215, "left":10},
{"url":"url1/cmp/ui/sprpanelcrns.png", "top":3280, "left":10},
{"url":"url1/globalAssets/imgHPHdrRgtYellow.gif", "top":3691, "left":10},
{"url":"url1/globalAssets/imgPanelLRGreyGrad.gif", "top":3721, "left":10}]}
I'm thinking in particular of the 'use GET for Ajax' YSlow rule. Not really sure if
it's worth it to add the abbreviation logic. Any thoughts?
Sep 16, 2009
I would vote to just do POST. There's another issue that has come up - some people didn't realize their image URLs were being sent to a web service and feel it's a loss of privacy. Putting the URL in POST at least hides those URLS from web server logs. I don't think the extra packet is a big deal. |