In javascript, is there anyway to query how large css/js files are, and how large image files are? I have a unique situation where I give a user a preview of a page, and that page can either be the full page, or google's cached text-only version of the page. The text only version loads instantly.
Don't think there is, but figured I would ask.
Maybe Google's index also holds information on page load times, would anyone know how to query this load time?
I want to make my app consider loading the text version of a page if it recognizes that it will take a long time to load the full page.
What I might do is search through the html string for a page, and just count the number of http requests that will be made (each css link, script tag, and img tag) via string manipulation. If there are more than X requests that would be made by inserting and loading that page's full html for the preview, then I'll opt for the instant text version of the page.