WebPagetest Forums

Full Version: async javascript - and sprite for pgn fancybox div
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
http://www.webpagetest.org/result/111219...1/details/

Any ideas how I can improve this result? Powerreviews.com, the company we use for our reviews, requests several javascripts and makes a number of other requests. Not sure how to address either. Also, liveperson is making an https request - but I can't tell if there's not an easier way to just link to my liveperson popup box.

The page includes both a color-selection dropdown box and a jquery/fancybox pop up div which includes several png files, one for each color swatch. This totals about 20 requests. Not sure if there's a practical way to combine them into a sprite while keeping the layout I'm using.

Thanks in advance for any help.
Given that the color selector is just using solid color squares, you should be able to do it all without images (though I'm not sure if there is a simple plugin that will do it for you). You should also be able to use a sprite but it seems like a waste when a div with changing background colors would achieve the same result quite easily.

It looks like the liveperson script is async (though inline and relying on browser support) so newer browsers should load it fine without blocking. I'd recommend taking it a step further and using a more bullet-proof async injection since it doesn't have any dependencies (Stoyan has a good write-up here: http://calendar.perfplanet.com/2011/the-...c-snippet/ )
found a simple a href version of the liveperson code.

looks like this - note 12345678 gets replaced with your unique ID

Code:
<!-- BEGIN LivePerson Button Code -->
<a href='http://server.iad.liveperson.net/hc/12345678/?cmd=file&file
=visitorWantsToChat&site=12345678&
byhref=1' target='chat12345678'
onClick="window.open('http://server.iad.liveperson.net/hc/12345678/
?cmd=file&file
=visitorWantsToChat &site=12345678&referrer='+
document.location','chat12345678','width=472,height=320');
return false;">Live chat</a>
<!-END LivePerson Button code -->
Reference URL's