Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

How to use same Client Library(.css & .js) url from author to multiple publish instances

Avatar

Level 1

Hi ,

I have a requirement to update the client library url with uniqueID if there is an update in the file. Also the URL for file should be consistent through all the publish instances to control the caching of libraries on AKAMAI

For example:

Base.css file url in author should be like this : /etc/designs/myproject/base.8aff76f8da9c7419c296fa68db664c.css

<8aff76f8da9c7419c296fa68db664c> : this is a unique id which we generate by using  MessageDigest unique key .
 

In author mode i am getting all the css and js file with correct final url and the unique id is appended in the URL of file but when i replicated the package and design to publish instance then all the libraries appended with the same id in the URL.

The functionality is working fine on author instance but not able to figure out the reason of this behavior in publish mode.

Could any one please suggest what would be the reason for this behavior? Also please suggest if there is any other better approach to achieve this requirement.

Thanks in Advance

/RK

1 Accepted Solution

Avatar

Correct answer by
Level 8

What are you using the generate your MessageDigest? If the source of you message digest is a node in the repository, as opposed to the actual file then difference is probably due to the last modified data varying across publish instances (that or the created date). If you are using the node then I'd suggest trying to generate it based off the file. 

View solution in original post

1 Reply

Avatar

Correct answer by
Level 8

What are you using the generate your MessageDigest? If the source of you message digest is a node in the repository, as opposed to the actual file then difference is probably due to the last modified data varying across publish instances (that or the created date). If you are using the node then I'd suggest trying to generate it based off the file.