4 ms·
You could check to see if there is content on the raw received HTML as well as indexing the content after evaluating JavaScript. If the page pre-JS page has con
by kevincox 6y ago
You could check to see if there is content on the raw received HTML as well as indexing the content after evaluating JavaScript. If the page pre-JS page has content you mark it as no-JS friendly and if it only gets content after running JS then you mark it as JS-required.
- kube-system 6y agoWhat if the page gets part of its content from JS, or it uses JS to facilitate users actions? This is fairly common.
- kevincox 6y agoIf resources were no concern you could rank the page twice and have separate JS and no-JS indexes. Of course this isn't perfect as a lot of the ranking comes from pages referring to it but I think it is fine. If the page has a good chunk of content it likely still makes sense to include it in no-JS searches. I don't think people will be annoyed that they can't do every action on the page, the real annoyance is getting a blank screen or the main content otherwise unavailable. So at the end of the day I think just having a js-required flag for each document is sufficient and set that flag if the "main content" (as determined by heuristics) is unavailable before running JS. I think that would be good enough to satisfy most users with JS disabled without too much expense.