Skip to content
This repository was archived by the owner on Jan 22, 2026. It is now read-only.
This repository was archived by the owner on Jan 22, 2026. It is now read-only.

htmlCompatibility="html5" doesn't remove type when using the LazyLoadRenderer  #203

@andersbrohall

Description

@andersbrohall

When using 1.9.10, with htmlCompatibility set to "html5" the output in the view still contains type="text/javascript" in the script tags rendered as a compliment to /WebResource.axd.

Example:

StandardRenderer:
<script src="/Scripts/blocking.js?cdv=123" ></script>

LazyLoadRenderer:
<script src="/WebResource.axd?d=zwknGD9um8nJ5iro3fpcG6bP2uF2y04XGbo_kIftxgePzGwzeshejCqMB8cS1HzSGnFy8XC_FwwsdTjCXr93L7CZirYmQHdnVXsyZQaaAgvbNxmmOF0IktRA-cyRKfds_yH9ij26fEtQug7rP96QCdpLt8-YwLyrldbrOM2vkTY1&t=637570492660000000" ></script><script type="text/javascript">CDLazyLoader.AddJs('/Scripts/lazy.js?cdv=123');</script>

The htmlCompatibility-switch is in set the clientDependency element in web.config (or /config/ClientDependency.config to be precise since we're using Umbraco 8.13.0)
<clientDependency htmlCompatibility="html5" version="123" fileDependencyExtensions=".js,.css" loggerType="Umbraco.Web.CdfLogger, Umbraco.Web">

Works:
Html.RequiresJs(new JavascriptFile("~/Scripts/blocking.js") {ForceProvider = "StandardRenderer"});
@Html.Raw(Html.RenderJsHere("StandardRenderer"))

Not working:
Html.RequiresJs(new JavascriptFile("~/Scripts/lazy.js") {ForceProvider = "LazyLoadRenderer"});
@Html.Raw(Html.RenderJsHere("LazyLoadRenderer"))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions