View Full Version : Retain Font Setting
Irishkid
15 Nov 2007, 02:37 PM
On my website I have 7 pages. I have two javascript buttons which can increase or decrease the font size. I have these buttons on each page. When I move from page to page the font size is not remembered, how can I change that so when I change it on one page it will keep that setting for the next page?
alvo
15 Nov 2007, 08:01 PM
The web is stateless in the basic way it works. A person want to view a page and so their browser connects to the server and sends a request. The server responds by sending the page and then disconnects. There is no more contact between the two unless the user requests another page, at which time a new request is sent to the server. The server has no way of knowing that this is a continuation of the previous session without being told somehow that this is the case. There are two ways to do this, one is to set a cookie on the users machine which you can have the server check to see what their preferred setting is. The other way would be to encode the requesting URI send to the server to have that information in it, although that would probably be more difficult to accomplish the same thing.
Powered by vBulletin® Version 4.2.0 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.