0 Replies Latest reply on Oct 5, 2011 8:18 AM by Ronald Johnson

    a4j:mediaOutput: Add server / prefix to generated url?

    Ronald Johnson Newbie

      To speed up our website (that contains MANY images), we would like to trick the browser into making more than 2 parallell connection to our server.


      e.g. create urls where the servernames are different:







      these will all point to the same IP, but will get around the max 2 connections to same domain issue (that the clients browser has) and load more images in paralllel.

      Our content is however generated by the a4j:mediaOutput tag which generates a relative url.

      is there any way to tell the a4j:mediaOutput tag to add a specific domain in front of the relative url?

      Or an alternative way to achieve the same effect?


      To sum, for the generated "href" from mediaOutput, I would like to add a prefix "http://server1.example.com"



      at the moment the html from mediaOutput looks similar to this


      <img id="rList:0:itemForm:j_id1853" src="/myapp/a4j/s/3_3_3.Finalorg.ajax4jsf.resource.UserResource/n/n/DATA/eAGNUkFrEasdasdsadehNgfz.xhtml"/>


      and i want it to become


      <img id="rList:0:itemForm:j_id1853" src="http://server1.example.com/myapp/a4j/s/3_3_3.Finalorg.ajax4jsf.resource.UserResource/n/n/DATA/eAGNUkFrEasdasdsadehNgfz.xhtml"/>