Skip to content

AEM — Versioned Clientlibs


Guide to configure versioned client libraries on AEM and IIS web server on Windows 10 Enterprise.

Tools Used:

  • AEM
  • IIS Webserver
  • ACS Commons Package Version 3.17.x


  • AEM Publish instance up and running
  • ACS commons package pre-installed
  • IIS Website for AEM Instance


STEP-01: ACS Commons Verification

NOTE: It is presumed that ACS Commons are already installed on the AEM instance

ACS Commons Package — version Installed 3.17
  1. Go to crx Package manager
  2. search for ACS commons
  3. Verify that the package is installed [if not use the this link to install and configure ACS Commons

STEP-02: Application Config Directory

application config directory
Application Config Directory
  1. Go to CRXDE
  2. select the apps folder
  3. select your application [sdintranet] where you want to enable versioned clientlibs
  4. select config folder

STEP-03: Create rewriter configuration folder

App config folder
App config folder
Rewriter configuration folder
Rewriter configuration folder
  1. Right-Click on the config folder
  2. select Create
  3. select create Node
  4. on the pop-up window
  5. name: rewriter
  6. Type: sling: Folder
  7. click OK
  8. press Save All

Step-04: Copy default rewriter configurations from Library (OOTB)

Copy OOTB rewriter config
Copy OOTB rewriter config
Rewriter config on app config folder
Rewriter config on app config folder
Verify and Save
Verify and Save
  1. Go to libs
  2. select cq
  3. select config
  4. select rewriter and right-click on default
  5. copy the default config
  6. go to apps
  7. go to sdintranet application
  8. select config
  9. select rewriter and right-click on rewriter folder
  10. paste, verify and press Save All

STEP-05: [Optional] Rename default config to a appropriate configuration

Rename the configuration
Rename the configuration

STEP-06: Add transformer Type – versioned-clientlibs

Edit the transformer types
Edit the transformer types
Add the clientlibs transformer type
Add the clientlibs transformer type
  1. Select the renamed rewriter [/apps/sdIntranet/config/rewriter/versioned-clientlibs]
  2. Edit the transformerTypes property
  3. click the + symbol
  4. Add the transformerType versioned-clientlibs
  5. click OK
  6. Press Save All

STEP-07: Restart AEM instance for the changes to take effect

Make sure you restart the AEM instance, for the clientlibs to take effect, Restarting the remote server can be done in any way you are comfortable, one can directly log into the instance and restart the AEM service, or can remotely restart using Jenkins if configured or can restart using Remote Session.

Get the remote service information
Get the remote service information
Stop the service
Stop the service
Start the service
Start the service

STEP-08: Verify the sling rewriter status

versioned clientlibs verification
versioned clientlibs verification

STEP-09: Configure IIS to send the right header to set a long TTL

Add the following to the IIS webservers system/web.server sectionGroup

                <remove name="X-Powered-By" />
                <add name="X-XSS-Protection" value="1; mode=block" />
                <add name="X-Content-Type-Options" value="nosniff" />
                <add name="Cache-Control" value="max-age=2592000" />
                <add name="Strict-Transport-Security" value="max-age=31536000" />
                <add name="Access-Control-Allow-Origin" value="*" />
                <add name="Access-Control-Allow-Methods" value="GET" />
                <add name="Access-Control-Allow-Headers" value="Content-Type" />
IIS Configuration to send the right header to set a long TTL
IIS Configuration to send the right header to set a long TTL

Shashi View All

-== Superman ==-

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: