I have my index.html
& data.json
file both in the same directory
so how do I access the json file from index.html?
maybe something like this in the index.html :
<script>
const data= require('./data.json') //obviously this won't work
</script>
according to all the answers for this question, you have to first send the index.html file then make a fetch request back to the server to send you the json file
but is there no way to send both of them together to avoid delay?