Under the Jacaranda
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
Corsair@programming.dev to Web Development@programming.devEnglish ·
edit-2
1 year ago

XMLHttpRequest (XHR) Vs Fetch API

message-square
message-square
5
fedilink
5
message-square

XMLHttpRequest (XHR) Vs Fetch API

Corsair@programming.dev to Web Development@programming.devEnglish ·
edit-2
1 year ago
message-square
5
fedilink

Hi,

I discovered this webpage
https://developer.mozilla.org/en-US/docs/Glossary/XMLHttpRequest

Where it say

The Fetch API is the modern replacement for XMLHttpRequest.

Without further explain on why so…

Did you (yourself) migrated from XHR to The Fetch API ? and is it better ? or do you know any (not bias) article about it ?

What about performances etc…

Thanks

cross-posted on

https://lemmy.world/post/14707833

  • Corsair@programming.devOP
    link
    fedilink
    English
    arrow-up
    1
    arrow-down
    1
    ·
    1 year ago

    Thanks @[email protected] weird because I can use XHR as async… see: https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/open open(method, url, async)

    • SteveTech@programming.dev
      link
      fedilink
      English
      arrow-up
      3
      ·
      1 year ago

      Sure it let’s you use it asynchronously, but it predates and is not really compatible with JavaScript’s async/Promise API.

Web Development@programming.dev

webdev@programming.dev

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: [email protected]

Welcome to the web development community! This is a place to post, discuss, get help about, etc. anything related to web development

What is web development?

Web development is the process of creating websites or web applications

Rules/Guidelines

  • Follow the programming.dev site rules
  • Keep content related to web development
  • If what you’re posting relates to one of the related communities, crosspost it into there to help them grow
  • If youre posting an article older than two years put the year it was made in brackets after the title

Related Communities

  • [email protected]
  • [email protected]
  • [email protected]
  • [email protected]
  • [email protected]
  • [email protected]
  • [email protected]
  • [email protected]
  • [email protected]
  • [email protected]
  • [email protected]
  • [email protected]
  • [email protected]
  • [email protected]
  • [email protected]

Wormhole

  • [email protected]
Some webdev blogs

Not sure what to post in here? Want some web development related things to read?

Heres a couple blogs that have web development related content

  • https://frontendfoc.us/ - [RSS]
  • https://wesbos.com/blog
  • https://davidwalsh.name/ - [RSS]
  • https://www.nngroup.com/articles/
  • https://sia.codes/posts/ - [RSS]
  • https://www.smashingmagazine.com/ - [RSS]
  • https://www.bennadel.com/ - [RSS]
  • https://web.dev/ - [RSS]
Credits

Icon base by Delapouite under CC BY 3.0 with modifications to add a gradient

Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 5 users / day
  • 31 users / week
  • 179 users / month
  • 648 users / 6 months
  • 1 local subscriber
  • 3.9K subscribers
  • 390 Posts
  • 1.31K Comments
  • Modlog
  • mods:
  • snowe@programming.dev
  • Erlingur@programming.dev
  • Ategon@programming.dev
  • BE: 0.19.7
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org