f5 - refresh only the frame
Is it possible to refresh only one frame in the windows and not all the frames? My problem is that 开发者_运维问答i have a page index.php and inside there are two frames - menu and content. when the user clicks on refresh(f5) the index.php has been loaded again and the content page is blank.
What can i do?
If you are familiar with javascript's usage in page refresh. You can try that instead of traditional html do a job.
javascript:location.reload(false)
will do a page reload from the cache. Set this to your content page and for menu page you can set this.
javascript:location.reload(true)
What you can do is store the last page selected by the user in cookie (using client side code) then in the page load even (client side again) check for that cookie and if exists, load that page by default instead of showing blank page.
Using jQuery accessing cookies becomes really simple: http://plugins.jquery.com/project/Cookie
精彩评论