I was just working on a quick test code to see if i am able to do your project.
I am able to do it and it seems to be a very fun challenge.
Here is the structure of the project I have in mind :
Serverside:
- PHP proxy with caching capabilities
Clientside:
- A preloading function triggered at page loading, searching for hypertext links and triggering an ajax call to the proxy for each not already cached url.
- The preloading function can also be triggered for the links found in the preloaded domain to bring some sort of recursive caching.
Details:
- The first role of the PHP proxy is to get rid of all sorts of XSS, Same-Origin, etc... protections.
- His second role is to cache the proxified ressources and send proper HTTP headers (Cache-control / ETags) to bring up browser caching
- It will take care of browser accept language to cache and serve internationalized versions of webpages
- The role of javascipt is to make ajax calls to the proxy, avoiding loading symbol it will also be used to convert loaded ressources to data urls, including images, sylesheets...
- Stylesheets will also be parsed to convert their imports to data urls
- A global cache object will be used to store preloaded data. When a link will be clicked, the body innerHTML will be changed with the cached data.
To resume all, the key concept is to use ajax and data urls to get rid of the browser symbol using cache whenever/wherever it is possible to keep things fast