Hey guys, i'm starting a website and i have all my restfull api returning only json data separated from the html (server) code
(user fetch a page then the returning html has javascript making a javascript XMLHttpRequest to the api) ex:
i'm trying to follow whitehat basic practices so i tested my pages on lynx browser and there is almost no visually content (mostly javascript and json)
i can make my pages return plain HTML on requests but my api is so clean returning json data
How do you do seo for json/javascript code, is it better generating plain html or is there a workaround ?
(user fetch a page then the returning html has javascript making a javascript XMLHttpRequest to the api) ex:
Code:
GET /index -> <h1><script>var jsondata= requestjsondata('/api/products/uuid');document.write(jsondata.somedata)</script></h1>
i can make my pages return plain HTML on requests but my api is so clean returning json data
How do you do seo for json/javascript code, is it better generating plain html or is there a workaround ?
Last edited: