Virtual Happy Hour this month, Jun 28, we'll be getting a sneak preview at our soon to launch SaaS CMS!

Try our conversational search powered by Generative AI!

ClientResources.RequireScript - Possible to use async or defer?


I've created a Google Maps block for usage on my website.

At the top of the block I have something like this:

    var clientScript = string.Format("{0}&callback=initMap", Model.ApiKey);

And then in my layout I have this:


This is working.  However, Google recommends adding `async` and `defer` to the script tag for Google Maps, like so:

How can we instruct Episerver to inject async and defer attributes on the script tag which is output?

Jul 02, 2018 17:09
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.