Computing.Net > Forums > Web Development > Javascript to save last page viewed

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Javascript to save last page viewed

Reply to Message Icon

Name: Skips
Date: April 7, 2005 at 12:18:15 Pacific
OS: XP SP1a
CPU/Ram: AMD 1.8Ghz
Comment:

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!



Sponsored Link
Ads by Google

Response Number 1
Name: Jamie_McCoy
Date: April 7, 2005 at 12:31:53 Pacific
Reply:

only with cookies i shud imagine, altho u cud do it quite easy wih php

roamhosting.net


0

Response Number 2
Name: Skips
Date: April 7, 2005 at 12:36:49 Pacific
Reply:

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.


0

Response Number 3
Name: Michael J (by mjdamato)
Date: April 7, 2005 at 15:49:02 Pacific
Reply:

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


0

Response Number 4
Name: Skips
Date: April 8, 2005 at 11:19:27 Pacific
Reply:

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


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

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


Go to Web Development Forum Home


Sponsored links

Ads by Google


Results for: Javascript to save last page viewed

how do you save web page www.computing.net/answers/webdevel/how-do-you-save-web-page/1191.html

Using Javascript to determine... www.computing.net/answers/webdevel/using-javascript-to-determine/2683.html

javascript code www.computing.net/answers/webdevel/javascript-code/1475.html