MyBB Internal: One or more warnings occured. Please contact your administrator for assistance.
WebPagetest Forums - async javascript - and sprite for pgn fancybox div

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.

Any ideas how I can improve this result?, 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: )
found a simple a href version of the liveperson code.

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

<!-- BEGIN LivePerson Button Code -->
<a href='
byhref=1' target='chat12345678'
=visitorWantsToChat &site=12345678&referrer='+
return false;">Live chat</a>
<!-END LivePerson Button code -->
Reference URL's