deduplicate LD+json
could we have a way to identify script tags in route head via an id/key so we can deduplicate them (unlike say a link rel which is easy to dedupe)? right now i am seeing that if i have an ld+json in the root.tsx and one in the route, i end up with 4 or even 6 ld json script tags
6 Replies
afraid-scarlet•3mo ago
how do other APIs handle this? unhead, helmet...?
we could also allow postprocessing of route head stuff via a callback
like-goldOP•3mo ago
unhead has a keys concept for custom control https://unhead.unjs.io/docs/head/guides/core-concepts/handling-duplicates
Unhead
Tag Deduplication · Unhead
Learn how Unhead manages duplicate tags across your application with automatic deduplication.
like-goldOP•3mo ago
not sure about helmet
afraid-scarlet•3mo ago
ok can you please collect some more state of the art then we can decide which way we want to go
like-goldOP•3mo ago
https://uncovr.app/share/j975mms4dy6qxe51nzrczc5ws97q3t0r
pretty decent task for ai research
quickest-silver•3mo ago
I think these are all the same issue
https://discord.com/channels/719702312431386674/1392738885703958630/1392738885703958630
https://discord.com/channels/719702312431386674/1393343640524292166/1393413635807772745
https://discord.com/channels/719702312431386674/1393343640524292166/1413794962239262813