View Full Version : Javascript Cookies

Master Splinter
24 Aug 2005, 10:14 AM
Hello everyone!

I work in a financial organisation and our website is heavily regulated. We have a gateway page that has links to various sections within the site. Each link is 'protected' by a separate cookie. What happens is, the user clicks the link and is presented with a regulatory page that contains a link that they must click to progress to the page they require. When they click the link a cookie is written. The next time they click the original link they go straight to the requested page without seeing the regulations page. They see the regulations page again after 30 days when the cookie expires.

The way I do this at the moment is using JavaScript. Is there way I can do the same without using JavaScript as I need to make the website fully accessible to everyone using screen readers, text browsers etc?

Many thanks in advance!

24 Aug 2005, 05:23 PM
Yes, you could use a server side scripting language such as php or asp to manage the cookie/session. The code would be very similar in logic to the javascript you use now. However, all the calculations would be done server side, so the scripts preformance is not affected by the clients system.