PDA

View Full Version : Cookie setting on splash page



BarryDeez
11-14-2010, 04:40 AM
1) Script Title: Splash Page script

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex3/dynamicsplash.htm

3) Describe problem: I have enabled the splash page for a Magento site. It works fine. I am trying to set the cookie to work, and I do not think it is. I set frequency control to yes, and the splash will not show again, until the browser is closed and reopened. But that is only part of what I need. I want the cookie to enable for as long as possible. Im not sure what to do.

But I have not adjusted any of the cookie settings in the script, nor do I know what to change. Im not sure what the cookie path is, nor where to set the amount of time for it.
Can someone give me more detailed directions on the cookie settings.

djr33
11-14-2010, 04:52 AM
Cookies can be deleted manually or automatically by the browser-- so you can't control that.
What you can do is suggest a time to delete it and the browser won't keep it after that.

In other words, you can set a long time and hope it stays that long. If you set no time, it will by default end when the current session ends-- either after a long period of inactivity or, as you've found, when the browser is restarted.

So the basic answer is to just set the time as long as you can. Often, people use one year: 365*24*60*60 (seconds in a year).

BarryDeez
11-14-2010, 05:25 AM
Cookies can be deleted manually or automatically by the browser-- so you can't control that.
What you can do is suggest a time to delete it and the browser won't keep it after that.

In other words, you can set a long time and hope it stays that long. If you set no time, it will by default end when the current session ends-- either after a long period of inactivity or, as you've found, when the browser is restarted.

So the basic answer is to just set the time as long as you can. Often, people use one year: 365*24*60*60 (seconds in a year).

Ok, I understand. But where do I input that info into the splash page script, mentioned above. The script also asks for a cookie path...and Im not sure what that is about, or if I need to do something about it.

Beverleyh
11-14-2010, 09:26 AM
So change the display frequency setting to a higher number of required days. The documentation seems very clear on this although I've never used this particular script myself.

djr33
11-14-2010, 04:30 PM
It looks like the script is simpler than I thought: just follow the format in #3 and set it to a high number of days.
The script path should always be "/" unless you want to restrict it to only a portion of your site.