Express JS #12 - Cookies

Поделиться
HTML-код
  • Опубликовано: 15 сен 2024
  • Watch the full tutorial here: • Express JS Full Course
    Code Repository: github.com/stu...
    Support the Channel:
    Become a Member: www.youtube.co...
    Become a Patreon: / stuyy
    Buy me a Coffee: ko-fi.com/anson
    Donate on Streamlabs: streamlabs.com...
    Donate on PayPal: paypal.me/anso...
    Connect with me:
    Twitter: / ansonthedev
    Discord: / discord
    GitHub: github.com/stuyy
    Twitch: / stuy

Комментарии • 14

  • @MeihaJensen
    @MeihaJensen 3 месяца назад +7

    My takeaway
    1) cookies are small piece of data that contains small information.
    2) And it is set by the server and sent to the client, the client has to include the cookies upon subsequent request.
    3) the cookie returned is in string format. And we’ll like it in JSON so we use cookieparser middleware.
    4) cookie-parser middleware is useful for parsing cookies. To JSON format.

  • @xfactorbangs5821
    @xfactorbangs5821 Месяц назад

    Are you using the intelliSence for code Auto completion?,if not please reccomend what you are using .

  • @zqgAFf
    @zqgAFf 7 месяцев назад

    Hi I do have a question about your video I saw complete express courses, and I also saw those individual topic-based courses. But the complete one is older than the individual section. So would u please tell me the difference on contents

    • @ansonthedev
      @ansonthedev  6 месяцев назад +2

      There is no difference. This video is just a section of what you see in the 8 hour video. I decided to split up the 8 hour video into its own sections and put them in a playlist making it easier for those who just care about a specific topic rather than skim through the 8 hour video.

  • @josephkoh1562
    @josephkoh1562 6 месяцев назад

    can i use localstorage instead of cookie?

    • @ansonthedev
      @ansonthedev  6 месяцев назад +2

      yes, but browser does not send stuff from local storage automatically even when withCredentials is set to true. You will need to manually send the data from local storage to the server.

  • @three-zeros
    @three-zeros 5 месяцев назад

    Umm... I have a question: cookies will be deprecated and turned off in the Q2-Q3 of 2024 by Google, so can you use something else except them?

    • @ansonthedev
      @ansonthedev  5 месяцев назад +4

      Local Storage with JWT.

    • @three-zeros
      @three-zeros 5 месяцев назад +1

      @@ansonthedev oh, got you

    • @abdul.rawi215
      @abdul.rawi215 3 месяца назад +2

      as far as i understood google will only be removing third party cookies which means cookies created and accessed by the same website will still be there

    • @raphaelokenyi2138
      @raphaelokenyi2138 3 месяца назад

      Ive been trying to set cookies from my express backend.. the cookies show in postman when testing, but it doesnt show in the browser.. how can i fix this please

    • @anthonymedina4535
      @anthonymedina4535 Месяц назад

      ​​@@raphaelokenyi2138i have the same problem, finally, you solved it?