What is the Difference between encodeURI and encodeURIComponent

Поділитися
Вставка
  • Опубліковано 8 лис 2024

КОМЕНТАРІ • 22

  • @jeanmarcpourchel307
    @jeanmarcpourchel307 4 роки тому +2

    I missed this one when it was released!!!
    Very very useful!!!! Perfect explanation!!!
    Thank you very much.
    And as always thanks for teaching!!

  • @Venezuelangel
    @Venezuelangel 4 роки тому +2

    Hi guy, in a world where Tech Tutorials have incomprehensible Hindi accents or native English speakers that sound like they're bored out of their minds explaining stuff, I ask you to please, please continue producing more content. Love your voice and your attitude. I don't know why your channel isn't bigger.
    Obviously I've just found your channel, and I'm sorry if you've already done a tutorial on it, but I would love a video on REAL form validation with Javascript and RegEx.
    Not the Fischer Price version for babies they teach you in IT courses, I mean the real ones where the RegEx expressions have like four lines of hieroglyphs. with RegEx that checks Emails, Passwords that require Uppercase and numbers, the whole Shebang.
    Stay awesome, mate.

    • @SteveGriffith-Prof3ssorSt3v3
      @SteveGriffith-Prof3ssorSt3v3  4 роки тому +1

      I have a couple intro videos on RegEx. Eventually I will make some more advanced ones. I will definitely be making more videos for a long time to come.

  • @dmytromoroz4451
    @dmytromoroz4451 2 роки тому +1

    Great video. Thanks a lot!

  • @barungh
    @barungh 4 роки тому +2

    Very informative ... Learnt something new

  • @barungh
    @barungh 4 роки тому +1

    Happy Christmas !👍🎄🎁

  • @abiakhil69
    @abiakhil69 4 роки тому +2

    Happy Christmas ✌️

  • @iwswordpress
    @iwswordpress 4 роки тому +1

    Very useful. Thanks.

  • @theartist8835
    @theartist8835 4 роки тому +1

    Thanks for sharing! what is a use case that we may need to use these methods ? I understand that they encode /decode the url, but why would we want to do so ?

    • @SteveGriffith-Prof3ssorSt3v3
      @SteveGriffith-Prof3ssorSt3v3  4 роки тому +2

      When you need to embed a Url inside a url. There are times when you need to pass a url from one page to another or to the server. This let's you hide the special characters and do so safely.

    • @theartist8835
      @theartist8835 4 роки тому +1

      @@SteveGriffith-Prof3ssorSt3v3 much appreciated !

  • @OmgTruth
    @OmgTruth 4 роки тому +1

    nice great video. wondering why angular router.navigate['=?/'] will convert to '%...'. Angular must be using encodeuricomponent by default. any inputs?

  • @abiakhil69
    @abiakhil69 4 роки тому +1

    Javascript patterns video upload it sir.

  • @arcadan
    @arcadan 2 роки тому +1

    so bad.. I tot i could use encodeURL to dont encode "|" pipe, i need to send this like that, instead of encoded format, is there any way that could give me this solution?

    • @SteveGriffith-Prof3ssorSt3v3
      @SteveGriffith-Prof3ssorSt3v3  2 роки тому

      encodeURL means encoding a string so it is allowed to be passed as a valid value in an HTTP Request or Response. The values in the headers MUST be url encoded.
      You can decode the string on the other side - in the serverside code.
      If you are sending data via HTTP and don't want to use encodeURL then send it through the body.

  • @jimshtepa5423
    @jimshtepa5423 Рік тому +1

    what is the purpose of encoding? is it to hide path to the api from users?

    • @SteveGriffith-Prof3ssorSt3v3
      @SteveGriffith-Prof3ssorSt3v3  Рік тому +1

      In a URL there are certain characters that have special meaning. Colons, ampersands, hashtags, equal signs etc. If you want to include one of those as part of your hash value or querystring then you need to URI encode the string. We need to hide the special characters but still include them.

    • @jimshtepa5423
      @jimshtepa5423 Рік тому +1

      @@SteveGriffith-Prof3ssorSt3v3 understood! thank you