Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

cookies on Server  RSS feed

 
Ashimashi Kabashi
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
is there any concept of saving cookies on the server through server scripting languages i.e. php, jsp, asp.

What I mean to say is, everybody knows we can save cookies on the client side via javascript. But is there any way we can save cookies on the server?

What I am asking is.. is it possible?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66144
143
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No. That would make no sense at all. The whole purpose of a cookie is to preserve a bit of data associated with a particular domain on the client for later use. It's make no sense to save them on the server.

If you want to persist data on the server, that's what file systems and databases are for. To persist temporary data for a short period, the session might be used.

What are you actually trying to accomplish?
[ April 09, 2008: Message edited by: Bear Bibeault ]
 
Ashimashi Kabashi
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
oh I am investigating how come a webform crashed one fine day. The code is working fine on the test server, but for a particular period of time it didnt work on the production server. Cookies were being used in the application (I was using PHP to generate cookies so just wanted to make sure if there was any way a server side scripting language behaved differently when it comes to cookies than client side scripting langages) The only change that happened a day ago was that the server time stamp had been shifted one hour back.

So we don't have any clue why it didn't work. It didn't insert any thing into the database for about 20 minutes and then started working fine. (There are validations on the web form so there was no way the user could have skipped those).
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66144
143
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, differences on the back-end can appear how the cookies get created. But they're not stored there.

Cookies have a timestamp for expiration, so a boof in server or client time settings can affect them.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!