2 Replies Latest reply on Apr 4, 2013 8:46 AM by alaris83

    CSS sprites for RichFaces images

    alaris83

      Hi,

       

      is there any possibility to have functionality like CSS Sprites for images used in RichFaces 4.x?? We are facing problem with network connections to distance locations and each reduced request to server can save seconds.

       

      thanks a lot for advise

        • 1. Re: CSS sprites for RichFaces images
          healeyb

          When you say "richfaces images", can you provide a quick example of what you mean please?

          • 2. Re: CSS sprites for RichFaces images
            alaris83

            Hi,

            I mean images used in components.

            For example open Tree component http://showcase.richfaces.org/richfaces/component-sample.jsf?demo=tree&skin=blueSky in showcase and open also firebug or another development tool. Switch to Net/Images tab and refresh page. You can see there images used for this single RF component like, "+", "-", "folder", each of these image has to be downloaded by separate browser thread.

            For example when you have page where you use all RF component you can count maybe 15-20 images which has to be downloaded or as for modify each time that page is loaded.

             

            When network connection has limitation and number of thread should be reduce due to long response time, each image on page can take several seconds of loading of page.

             

            I know what you propose, increate number of browser threads, but it will be great if similar to JS and CSS which has been join together as packed.js and packed.css we can have something similar for images.

            I found using CSS sprites with images in Primefaces framework, where they have one image file for all components images.