Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Store a picture in a cookie

Tags:

html

I would like to store a small profile picture of my users in their browser so that they can see their profile picture (in the login form) each time they log in (when they tick remember me for example). I think hotmail is doing something similar.

Is it possible to store the image on the user computer and store the path in a cookie? It seems that the maximum size of a cookie is 4096 Bytes so it might be hard to store the image itself in a cookie. Do you have any ideas how I could do that?

like image 924
Mick Avatar asked Jun 21 '12 00:06

Mick


1 Answers

Surely it's more efficent to store a link to an online image in the cookie, and use that instead?

Each time a webpage is browsed, the cookies get transmitted - storing an image will add unecessary bandwidth.

like image 53
Robbie Avatar answered Oct 05 '22 03:10

Robbie