0 Replies Latest reply on Jul 28, 2013 11:52 PM by Kristian Wright

    Caching Client Libraries

    Kristian Wright Level 1

      Does CQ have a built in way to deal with client library caching issues?  When using the foundation image component, the final src attribute of the image in the clients browser is something like:


      <img title="My Image" alt="My Image" src="/content/myapp/en/mypage/_jcr_content/somewhere/my_image.img.png/1368587149255.png">


      This allows the browser to cache the image, but when the image is updated in CQ, the src attribute is updated accordingly, and therefore the new image is requested by the browser.


      Does CQ also have this kind of functionality for it's client libraries, so that javascript and CSS files can be cached in the same sort of way, and automatically get renewed when updated?  For example, something like:


      <script type="text/javascript" src="/etc/designs/myapp/myclientlib_1368587149255.js"></script>

      <link rel="stylesheet" href="/etc/designs/myapp/myclientlib_1368587149255.css" type="text/css"/>


      I know we could set the expires headers, but this is not the most efficient way since the files may not have changes since since they were last requested.


      Also, can this be done for other items, for example font files etc?


      Any thoughts appreciated...