While thinking about our URL structure, I came up with an idea. But I don’t know whether this is feasible or not, and would very much welcome feedback here.
We have a couple of URLs which already must issue HTTP redirects. For example, our root folder http://company.com issues an HTTP redirect based on the user’s language preference to f.x. http://company.com/en/ .
I thought, can these redirects serve a dual purpose by pre-loading or priming the browser cache with cache-able objects needed on the subsequent pages?
As an example, we load jQuery from the Google CDN on all our pages. Is there a way to make the browser cache jQuery while it’s being redirected?
If I load one “empty” HTML page which preloads JS and redirects to the proper page while blocking the redirect until the JS has loaded, then the overall page load speed for the content page doesn’t improve – it probably even gets worse.
Should an HTTP 302 redirect header with a HTML body with regular script tags work, or is the combination of a redirect header and a content body pure nonsense?
Should an empty HTML page with a few SCRIPT tags in the BODY and a META REFRESH work?
Any suggestions, any insights, does this seem sensible or not? Thanks,