Hi Gerasimos,
it has been a while. CCC has worked ok for long.
But now we want to optimize the load time of our page and were thinking to run all the .js asynchronously, especially the jQuery .js which is heavy. Everything would work, except CCC...:
- If I want to load the jQuery .js asynchronously, I also need to load the CCC "call" script asynchronously... and moreover after the jQuery, since CCC needs it.
- NOTE: this forces to make the whole "call" script static into a [ccc-call.js] file. For this, I use functions into onAccept and onCookiesAllowed to load the third-parties scripts, instead of writing these URL-dependent scripts directly in the CCC call code (server-side, with php).
Could work... Unfortunately, CCC "plugin" (cookie_control.js) script uses "document.write", and I get a warning from Chrome saying:
"It isn't possible to write into a document from an asynchronously-loaded external script unless it is explicitly opened"
The fact is that the "plugin" part is still loaded synchronously. Only the "call" part is loaded asynchronously, and I did not except this fail.
Can you see a way out?
Fred