Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change module timeout in Require.js?

Tags:

requirejs

When I am on slow mobile broadband I sometimes get:

Uncaught Error: Load timeout for modules: goog!maps,3,other_params:sensor=false_unnormalized2,goog!maps,3,other_params:sensor=false,async!http://www.google.com/jsapi

I would like to raise the timeout for similar users as me sometimes using mbb.

like image 880
denysonique Avatar asked Jan 24 '13 21:01

denysonique


1 Answers

See waitSeconds config value from RequireJS docs:

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

Per the docs, the default is 7 seconds. You can set it in your require.config call like this:

require.config( { 
  waitSeconds : 30,
  paths : {
      //etc..
  },
like image 195
ddotsenko Avatar answered Oct 15 '22 14:10

ddotsenko