-5

I just want to pop a video (mp4 or webm format) on count down timer . take a example , countdown timer is 30 second. when timer is start video will be start and when count down timer is on 5 second video will be closed.

cweiske
  • 27,869
  • 13
  • 115
  • 180
Amit Sharma
  • 83
  • 11
  • possible duplicate http://stackoverflow.com/questions/6339783/what-is-the-difference-between-sessions-and-cookies-in-php – Developer May 30 '15 at 08:48
  • http://www.phpcubes.com/what-is-the-difference-between-session-and-cookies.html – Developer May 30 '15 at 08:50
  • possible duplicate of [Differences between cookies and sessions?](http://stackoverflow.com/questions/359434/differences-between-cookies-and-sessions) – Chand Priyankara May 30 '15 at 08:51
  • I'm voting to close this question as off-topic because it reflects zero effort to understand the issue. – elixenide May 30 '15 at 08:56

2 Answers2

1

The concept is storing persistent data across page loads for a web visitor. Cookies store it directly on the client. Sessions use a cookie as a key of sorts, to associate with the data that is stored on the server side.

It is preferred to use sessions because the actual values are hidden from the client, and you control when the data expires and becomes invalid. If it was all based on cookies, a user (or hacker) could manipulate their cookie data and then play requests to your site.

I don't think there is any advantage to using cookies, other than simplicity. Look at it this way... Does the user have any reason to know their ID#? Typically I would say no, the user has no need for this information. Giving out information should be limited on a need to know basis. What if the user changes his cookie to have a different ID, how will your application respond? It's a security risk.

sapamlucy
  • 298
  • 1
  • 2
  • 15
-1

cookies are stored in your Pc while sessions are stored both on server and on your pc this is the main difference

Tousif
  • 253
  • 2
  • 11