I use a website which has a very high response time. Most of the time is taken to load a page with its javascript and css files.
I want to write a Google Chrome extension which can save/cache all the js files for a really long time.
I know JS on its own would not provide me this feature. Does google chrome have an api to do the same?
Are there any other options ?
It doesn’t sound like a good idea
If the webserver correctly places the HTTP headers, the browser (Chrome and all others) will cache all resources correctly.
See How can I improve loading times on a static HTML site?
Edit: Now that I better understand your need, what you can do is create an extension that
$('head>stylesheet').remove()$(document).ready(main_function)(rather than<body.onload="main_function()">)