Content
@
0 reply
0 recast
0 reaction
Petra ⊙
@0xpetra
I am once again asking: Why this isn't working? headers: { 'Cache-Control': 'max-age=0', }
5 replies
1 recast
12 reactions
horsefacts
@horsefacts.eth
Clients scrape and store the initial frame metadata when the embed is created. So whatever image URL is present when the cast is posted is what we will always use. Most frameworks encode the state of the image in its URL, usually in a query parameter. If you change the image, this URL changes. Something like: https://frame.example.com/image?state=abc123 Your cache headers are probably working fine. Clients will load your image from this URL every time the frame renders. But since the image state is part of the URL, a request to this URL always generates the same image. What you need to do instead is serve a dynamic image from a static URL, like: https://frame.example.com/image Since there is no state in the URL, when clients scrape the initial frame, subsequent requests can return a different image. We just added a docs page on this here: https://docs.farcaster.xyz/developers/frames/advanced
0 reply
0 recast
2 reactions