Store a picture in a cookie

前端 未结 4 688
野的像风
野的像风 2021-02-08 10:14

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 r

相关标签:
4条回答
  • 2021-02-08 10:53

    Why you don't want to store picture on server and store the path in cookie?

    This looks more situable, then write additional data on user computer...

    0 讨论(0)
  • 2021-02-08 11:02

    Could you store the path to the image in a cookie and use the value to render it in the login screen?

    0 讨论(0)
  • 2021-02-08 11:06

    Store it in localStorage using JavaScript.

    https://web.archive.org/web/20160313121817/https://www.ibm.com/developerworks/mydeveloperworks/blogs/bobleah/entry/html5_code_example_store_images_using_localstorage57?lang=en

    0 讨论(0)
  • 2021-02-08 11:08

    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.

    0 讨论(0)
提交回复
热议问题