kubetail-org / loadjs

A tiny async loader / dependency manager for modern browsers (899 bytes)
MIT License
2.57k stars 149 forks source link

Waiting time between retries #71

Open jonathansp opened 6 years ago

jonathansp commented 6 years ago

numRetries is a good approach to get around to mobile network issues.

Retrying a couple of time in a row does not mean that loadjs will load successfully. Maybe waiting for some seconds before trying again would be better.

Could you please add an optional parameter in order to have loadjs wait some seconds between retries?

amorey commented 6 years ago

Can you describe the scenario you're running into in a bit more detail? Is the purpose of a timer to deal with connectivity issues?

azizhk commented 4 years ago

Yup the purpose of the timer is to space out between requests hoping that the internet comes back on.

Something like:

{
  numRetries: 5,
  retryWaitTime: 1000 // 1 second
}