Encoding NEXT_DATA json #41433
Replies: 3 comments 1 reply
-
There is one more thing which troubles me with current state of NEXT_DATA - on each page this JSON contains data about current page, this string starts with |
Beta Was this translation helpful? Give feedback.
-
did you find any solution? |
Beta Was this translation helpful? Give feedback.
-
We have the same issue. Would be nice to be able to encoding. But i will also look into trying not have anything starting with / in there. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the feature you'd like to request
Is it possible to introduce (or implement it for given project, I would be 100% satisfied with a guide how to implement it myself) a function, that will encode NEXT_DATA into base64 or something like that and decode it when needed?
The problem which this function can fix, is Google crawling bits of NEXT_DATA and trying to open links which are not valid (in my case, I use parts of urls in next data with which I build urls in code, Google then tries to enter that url part and reports a lot of 404's).
Describe the solution you'd like
getInitialProps
, encode data in BASE64 (or other format)Describe alternatives you've considered
I tried adding something like
rel="nofollow"
and looked into workarounds like<!--googleoff: all-->
(which doesnt work).One other idea - would it be possible to create a special variant of page (only for robots) which would have no NEXT_DATA script at all? This would also solve my primary issue
Beta Was this translation helpful? Give feedback.
All reactions