Chrome not allowing synchronous calls

Chrome not allowing synchronous calls

jklovancjklovanc Posts: 8Questions: 2Answers: 0

I am using a stateLoadCallback. One of the parameters the documentation recommends is "async": false. The problem is that Chrome has deprecated that and returns the following warning;
Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check ...

The problem is that without that the stateSaveCallback triggers first and wipes out my saves state. I do not know how to fix this.

Answers

  • allanallan Posts: 63,692Questions: 1Answers: 10,500 Site admin

    Unfortunately this is a limitation in the current DataTables API. There is no callback option with which to load an async state at this time I'm afraid. This is something that I plan to address in a future version of DataTables.

    Allan

  • jklovancjklovanc Posts: 8Questions: 2Answers: 0
    edited July 2016

    So we can not load the state? Why even have a load state callback if it does not work in the most used browser?

  • allanallan Posts: 63,692Questions: 1Answers: 10,500 Site admin

    You can load a state, but you cannot load it asynchronously. It currently must be synchronous.

    Also, it does currently work in Chrome, but it emits the warning you are seeing. As I said, this will be addressed.

    Allan

This discussion has been closed.