Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I have a website thats made up of 2 frames. I would like the frame thats open to be saved witin the index.html, so next time the website is viewed, the last page saved will be viewed.
Understand? Im sure this can be done with Javascript but im unsure on how!
Thanks!

Thanks for you reply! Only problem is this is done on a microchip running a webserver so anything like cookies or php is out the question. Its a very basic webserver!
Ive been told this could be done using javascript by storing the webpage as a value and that value be stored within the startup page.

Skips,
I've read and re-read your post several times and it still isn't clear. I think Jamie interpreted it one of the ways I've read it.
According to your post header "Javascript to save last page viewed" I would assume that you want the last page viewed by a visitor to be the first page they see when they return. You could do this using javascript to put a cookie on the clients computer and then on the return visit read the cookie (w/javascript) to determine which page to be displayed.
Another way of interpreting your post is that you want the last page updated on the server to be the first page that is displayed to a user when they first visit your site. If this is what you mean then, yes, it can be done with JavaScript. But it requires SERVER-SIDE scripting not CLIENT-SIDE. Thet menas the javascript needs to be interpreted by the server, not the client. And if your server is just a "basic" server, then it probably doesn't do this. You *could* do it with client-side script, but you would need to create a page that would request every possible page on your site, reference the last modified date, then reload the page that had the oldest date. But it would be a terrible experience for the user waiting while all these pages clicked by!
I was also a little confused by "...this is done on a microchip running a webserver...". Uh, all servers (i.e. computers) run on a microchip!
Michael J

Thanks for you help!
When I was refering to the "this is done on a microchip" what i meant was I have a embedded ehternet board with a 16f877 microschip. I was just trying to point out the fact this isnt being done on a PC running apache or IIS etc.
I think what im trying to do cannot really be done on such a basic server but thanks for all your ideas

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |