dormi.zone
  • Communities
  • Create Post
  • 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
5
fedilink
6
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
    1•1 year ago

    Thanks @Max_P@lemmy.max-p.me 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
      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: !webdev@programming.dev

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

  • !html@programming.dev
  • !css@programming.dev
  • !uiux@programming.dev
  • !a11y@programming.dev
  • !react@programming.dev
  • !vuejs@programming.dev
  • !webassembly@programming.dev
  • !javascript@programming.dev
  • !typescript@programming.dev
  • !nodejs@programming.dev
  • !astro@programming.dev
  • !angular@programming.dev
  • !tauri@programming.dev
  • !sveltejs@programming.dev
  • !pwa@programming.dev

Wormhole

  • !cool_github_projects@programming.dev
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

  • 2 users / day
  • 28 users / week
  • 165 users / month
  • 604 users / 6 months
  • 3.91K subscribers
  • 384 Posts
  • 1.05K Comments
  • Modlog
  • mods:
  • snowe
  • Erlingur
  • Ategon
  • BE: 0.19.3
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org