Diagnosing and Optimizing Websites that Rely Heavily on JavaScript for Search Engines