Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • manila 199 posts 451 karma points
    Dec 18, 2018 @ 21:41
    manila
    0

    Master template (and all included partials) hits 3 times - is it normal?

    I have an umbraco 7.6 site, really standard construction using Master template as a layout eg.

    @inherits Umbraco.Web.Mvc.UmbracoTemplatePage
    @{
        Layout = "Master.cshtml";
    }
    
    <div class="home-grid">
    @CurrentPage.GetGridHtml("content", "fanoe")
    </div>
    

    The above is my home page.

    When I'm debugging I noticed the Master page is hit 3 times while Home template is hit only once.

    That's quite strange isn't it?

    Why the page is calling the Master template 3 times? Even though it's very fast I think it's 2x too much and would speed up the loading if it's avoided. Cos in the above case Master is called 3 times so any partials within Master are also called 3x eg. footer nav, header etc.

    Why is it doing so and how can I load it only once?

    Did you experience similar issue?

    Thanks

  • Alex Skrypnyk 4888 posts 17641 karma points MVP 2x admin c-trib
    Dec 19, 2018 @ 08:56
    Alex Skrypnyk
    0

    Hi Manila

    The master page is calling only one time, it can be more if the page loads more times.

    Alex

  • manila 199 posts 451 karma points
    Dec 19, 2018 @ 09:54
    manila
    0

    Yeah but my home template loads only once and it calls Master only once as you can see in the code so why Master loads 3 times?

Please Sign in or register to post replies

Write your reply to:

Draft