3

I have a very huge script and sometimes require.js can't load it and throws a load timeout error.. Can requireJS make a retry? Or can it be performed in another way?

1 Answer 1

2

Try adding:

waitSeconds : 0

To your require.config object. This will set the time out on require to infinity.

You could adjust this figure based on your actual time out.

http://requirejs.org/docs/api.html#config-waitSeconds

Sign up to request clarification or add additional context in comments.

1 Comment

While this will improve upon the defaults for many mobile users or users on a slow connection, this still doesn't retry. Many problematic loads might require a retry to kick things off again vs just waiting longer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.