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
onten.eth | Ⓜ️🍖🎩
@rezaisgoat.eth
If you use another route for image generation add a random value for an arbitrary query parameter. If I was you I wouldn't have gone with the non-caching method for the GET images though. It uses too much server resources.
0 reply
0 recast
0 reaction
Matthew
@matthew
try setting both the uppercase and the lowercase version to 0? it’s so frustrating… not sure if it’s a vercel or frog issue
2 replies
0 recast
1 reaction
carlos
@chaps
do you want something lie this? https://gm.basefrens.io/api
1 reply
0 recast
0 reaction
Nestor Bonilla
@0xnestor
Welcome! I've been experiencing the same issue for several weeks now. I've tried setting max-age=0 in various locations, but haven't had any success yet.
0 reply
0 recast
0 reaction