Skip to content
Discussion options

You must be logged in to vote

Not a dumb question -- I had the same concern when first looking at SvelteKit. SvelteKit needs that __data.json endpoint to be available so it can fetch the data for a page when navigating. Other frameworks with client-side navigation and data loading (Remix, Next, Nuxt) do something similar. You can find more info in the glossary section of the docs.

In practice, I'm not sure how much of a concern this is. Though having a JSON endpoint makes it easier, people can still scrape your page's HTML for the data they need. However, there are a couple things you can do to make it more difficult to use the JSON endpoint:

  1. Only return the data you need. If you are calling an API that returns a bun…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@sonyarianto
Comment options

Answer selected by hewliyang
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants