Firefox causes POST request to be called twice

Viewed 576

In our Angular app, if a button is clicked a POST is done using httpClient.post() which calls a web api method that creates a record in the database.

Everything works find using Chrome and edge. However, in firefox, we see odd behavior as the record is created twice!

After soms research, we found that in the firefox logging we see only one POST request to the backend, but if we study the IIS logs, we see two POST entries

enter image description here

This causes the backend controller action to be called twice!

I'm wondering why firefox does cause IIS to call this POST twice and how I can fix it?

EXTRA INFO: I found that if I set in about:config of firefox the network.http.spdy.enabled entry to false, the request are not doubled anymore.

CONCLUSION for now: it has to do with firefox and http/2. Disabling http/2 fixes it. Also see this topic.

0 Answers
Related