Express JS #12 - Cookies

Поделиться
HTML-код
  • Опубликовано: 2 фев 2025

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

  • @Olderaccount17
    @Olderaccount17 3 месяца назад +4

    3 minutes in and I'm already *dying* for a platter of cookies.

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

    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.

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

      Good

    • @aqbgaming7656
      @aqbgaming7656 25 дней назад

      @@Mono6lade Client automatically send the cookies back to server, you dont need to include it manually.

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

    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  11 месяцев назад +3

      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.

  • @GabrielYasso-og7zc
    @GabrielYasso-og7zc Месяц назад

    amazing. thank you.

  • @xfactorbangs5821
    @xfactorbangs5821 5 месяцев назад

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

  • @imsotoxd
    @imsotoxd 4 месяца назад

    what is this font? :D

  • @tochimclaren
    @tochimclaren 2 месяца назад

    What's the point of signed cookies.

    • @durubhuru
      @durubhuru Месяц назад +1

      Imagine you're, at a party and you receive a VIP wristband to signal your presence there; this wristband bears a code crafted exclusively by the host himself/herself - if anyone attempts to create a counterfeit band or switch yours with theirs the mismatch in the code will reveal the ruse, to the host.
      Signed cookies operate in a manner by incorporating a code (signature) linked to the data that only the server can generate authentically. If an individual attempts to alter or forge the data in any way the signature will not align properly. The server can promptly detect any manipulation attempts. It serves as a method to confirm that the information being transmitted or received remains unaltered.

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

    can i use localstorage instead of cookie?

    • @ansonthedev
      @ansonthedev  11 месяцев назад +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 10 месяцев назад

    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  10 месяцев назад +4

      Local Storage with JWT.

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

      @@ansonthedev oh, got you

    • @abdul.rawi215
      @abdul.rawi215 7 месяцев назад +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 7 месяцев назад

      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 6 месяцев назад

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