By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,659 Members | 1,939 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,659 IT Pros & Developers. It's quick & easy.

Save and read a site-wide cookie

P: n/a
I wonder if you can help me with the following:

What is the Javascript code to store a site-wide cookie? (I want to
record whether a person has been to my site before).

What would be the code to read this value?

TIA
Mark

Feb 1 '08 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Mark1234567 wrote:
What is the Javascript code to store a site-wide cookie? (I want to
record whether a person has been to my site before).

What would be the code to read this value?
http://www.w3schools.com/js/js_cookies.asp

--
Bart
Feb 1 '08 #2

P: n/a
Thanks for the reply but I think you misunderstood my question.

The code you gave states "The next time the visitor arrives at the
*same page*, he or she will get welcome message."

I want the cookie to be able to be read/written for other pages in the
website as well.

TIA
Mark
On Feb 1, 11:11*pm, Bart Van der Donck <b...@nijlen.comwrote:
Mark1234567 wrote:
What is the Javascript code to store a site-wide cookie? (I want to
record whether a person has been to my site before).
What would be the code to read this value?

*http://www.w3schools.com/js/js_cookies.asp

--
*Bart
Feb 1 '08 #3

P: n/a
Mark1234567 wrote:
On Feb 1, 11:11*pm, Bart Van der Donck <b...@nijlen.comwrote:
>*http://www.w3schools.com/js/js_cookies.asp

The code you gave states "The next time the visitor arrives at the
*same page*, he or she will get welcome message."

I want the cookie to be able to be read/written for other pages in the
website as well.
That should be no problem. All web pages of the same domain have read/
write access to the cookie.

--
Bart
Feb 2 '08 #4

This discussion thread is closed

Replies have been disabled for this discussion.