04-01-2011, 10:48 PM
Dear all,
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?
I can think of a couple of ways to do this with Javascript. However:
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,
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?
I can think of a couple of ways to do this with Javascript. However:
- I would insist on a solution which also works for those mobile browsers and search engine spiders that don't understand Javascript.
- 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 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?
