Showing data dump in the type text/x-component
on the UI
#48527
Replies: 3 comments 5 replies
-
Hi, We are actually struggling with the same problem. Turns out that Next.js does some magic with the "vary" header, which instructs caching layers/services how to cache the content. If your caching layer, like a CDN, doesn't handle the vary header, or handles it incorrectly, then this can happen. I'm haven't found any official documentation on this, but I found this discussion that might help you: https://www.reddit.com/r/nextjs/comments/13bizz0/hosting_ssr_site_with_cache_control/ |
Beta Was this translation helpful? Give feedback.
-
I am experiencing this problem. |
Beta Was this translation helpful? Give feedback.
-
Were you able to find a solution for this issue? We are having this problem with cloudfare caching. |
Beta Was this translation helpful? Give feedback.
-
Summary
When I do a client side navigation from Page A to Page B using Link component, the page renders correctly.
When I check the network request, the type of the content being
text/x-component
and the response being:0:[["children",["slug","/slug","oc"],
in this format.Now when I refresh the page, I get:
0:[["children",["slug","/slug","oc"],
being dumped on the UI in place of HTML.I suspect this to be a cache issue, because when a query param is added the page renders perfectly and when I bypass the cache it renders correctly.
This does not happen there is a server navigation.
Can someone shed some light on this ?
Additional information
No response
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions