ordercloud-api / OrderCloud-Angular-SDK

Angular wrapper for OrderCloud-Javascript-SDK
MIT License
1 stars 3 forks source link

updates for 1.0.58, fix ie cache bug #4

Closed crhistianramirez closed 6 years ago

crhistianramirez commented 6 years ago

internet explorer 11 and below will cache any get request that has the same parameters, which can cause unintended consequences

in a client app an order list call was being made to get the most recent unsubmitted order. Some time later, the order was deleted and the same list call was used to get the "next" unsubmitted order. However since the list call was cached, they were getting the wrong order.

added superagent plugin 'superagent-no-cache' which handles this very situtation by checking if request is being made by internet explorer and then setting headers telling internet explorer explicitly to not cache the request