Expand my Community achievements bar.

Last modified time of a DAM resource

Avatar

Level 3

Hi,

when querying an image resource from AEM (e.g. /content/dam/blackrock/440px-AdamSmith.jpg) the value for Last-Modified header in the response does not match the jcr:lastModified timestamp value in the CRX. I would expect them to be the same, can you please help why they could differ?
I have attached the screenshots for both values.

Regards,
Peter

Screenshot 2024-06-27 at 17.09.15.pngScreenshot 2024-06-27 at 17.10.09.png

5 Replies

Avatar

Community Advisor

Hi @pnagy 
One of the reason could be that assets has different modify time on publisher or cached copy at dispatcher.

Could you please check timestamp at dispatcher?



Arun Patidar

Avatar

Level 3

Hi @arunpatidar ,

Thanks for all the replies. TBH not sure how I can check the dispatcher but that was an author instance I used for testing.
I have uploaded a new image on my local where I don't have any dispatcher / CDN, and the same behaviour (the difference in hours is just timezone difference but there is 18 sec difference yet).

Regards,
Peter

Screenshot 2024-06-28 at 11.01.29.pngScreenshot 2024-06-28 at 11.01.51.png

Avatar

Level 8

@pnagy I tried to verify on my instance for multiple assets, but I don't see this issue(the timestamp is same on both locations). 

I understand the curiosity piece of it but is there a specific use case you are trying to solve with Last Modified?

I'm curious to see what is the jcr:lastModified on the metadata node. Can you share.

Avatar

Level 8

@pnagy 

Dates in both locations seem to be same except for the format. ISO vs verbose/human readable.

 

The small difference in seconds might be due what @arunpatidar explained. The Last-Modified header is typically set by the Dispatcher cache, not directly from the JCR repository. If you are hitting the from Author instance, it should be the same.

 

Avatar

Level 3

Hi @pnagy ,

Timestamp jcr:lastModified on AEM instance and  last-modified in browser network console can  be different because content  served to end user might be from 

  • CDN or
  • Dispatcher

which can be different based on last flushed cache or minute time taken in replication.

 

Thanks