Last modified time of a DAM resource | Community
Skip to main content
Level 3
June 27, 2024
Solved

Last modified time of a DAM resource

  • June 27, 2024
  • 3 replies
  • 1312 views

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


This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by MukeshYadav_

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

3 replies

arunpatidar
Community Advisor
Community Advisor
June 27, 2024

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
pnagyAuthor
Level 3
June 28, 2024

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

gkalyan
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
June 28, 2024

@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.

gkalyan
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
June 27, 2024

@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.

 

MukeshYadav_
Community Advisor
MukeshYadav_Community AdvisorAccepted solution
Community Advisor
June 27, 2024

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