I have a page, which contains an iframe and a menu which navigates between pages that located on my server, and should be loaded into the iframe.
All the pages share big javascript files, and I want to know if there’s a way to reload only the content of the inner page, without reloading the scripts, or if there’s a way to load the scripts on the “master” page, and use them in the inner pages.
Thanks
If you concern about size and afraid of repeated downloads of same files – the best way is to let the browser cache this files. Actually, if you doing things right – the js files already must be cached and not downloaded again on iframe reload. (Also, you can use AppCache for modern browsers).
The caching can be a tricky thing, but you can check HTTP headers what is returned on requiest of this files and tune them for you needs.
Cache-control, max-age and expires your first friends.