+1-888-365-2779
Try Now
More in this section

Forums / Bugs & Issues / Rendered page source

Rendered page source

9 posts, 0 answered
  1. payam
    payam avatar
    8 posts
    Registered:
    19 Jul 2012
    04 May 2012
    Link to this post
    hi every body
    i think one of the big issues that sitefinity version 5 has is rendered page html that is not clean. i created a page without any widget or control then i switched to page source and saw a lot of script and webresource links that i never used. i dont know why sitefinity adds these to every page that i create. please write your comment about this issue.
    thanks
  2. Markus
    Markus avatar
    2763 posts
    Registered:
    25 Nov 2005
    07 May 2012
    Link to this post
    Dear Payam

    I think 5.1 will address some of the issues you are describing http://www.sitefinity.com/web-content-management/roadmap.aspx

    Memory and page optimizations

    The Sitefinity 5.1 release will bring significant performance improvements across the board. For faster performance Sitefinity will load components on demand, which will allow the Sitefinity Community Edition and the Sitefinity Standard Edition to work better in shared hosting environments. Additionally, these improvements will lower the cost of hosting any Sitefinity edition in the Cloud because of the lower resource usage.

    These might also be releated to the ability to browse and edit  for example.

    My advice. Wait till July when 5.1 comes out.

    Markus
  3. Jochem Bökkers
    Jochem Bökkers avatar
    787 posts
    Registered:
    13 Aug 2007
    07 May 2012
    Link to this post
    @Payam,

    Really? I just created a blank page with the default theme and an internal template in Sitefinity v5.0.2800 and this is my output:

    01.<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    03. 
    04.<head>
    05. <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    06. <meta name="Generator" content="Sitefinity 5.0.2800.0 PE" />
    07. 
    08. <link href="/Telerik.Web.UI.WebResource.axd?" type="text/css" rel="stylesheet" />
    09. <link href="/Telerik.Web.UI.WebResource.axd?" type="text/css" rel="stylesheet" />
    10. <link href="/Telerik.Web.UI.WebResource.axd?" type="text/css" rel="stylesheet" />
    11. <link href="/Sitefinity/Public/ResponsiveDesign/layout_transformations.css" type="text/css" rel="stylesheet" />
    12. <title>Test</title>
    13.</head>

    I cut the links on lines 8-11 short, but they're linking to a reset and 2 stylesheets because I selected the 'basic' theme.

    The head section couldn't be more clean unless hold the generator meta tag against Sitefinity.
    1.<body>
    2. <form method="post" action="test" id="aspnetForm">
    3.  
    4. <div class="aspNetHidden">
    5.  <input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEU/TGc/9wf" />
    6. </div>

    The body starts out clean as well with a normal asp form and a viewstate section.

    1.<div id="PublicWrapper" class="sfPublicWrapper">
    2. <div class="sf_cols wrapper">
    3. ...
    4. </div>
    5.</div>

    Naturally what goes between the PublicWrapper is depending on the template you choose, so can't hold that as a 'non-clean' setup.

    01.<script type="text/javascript">
    02.  //<![CDATA[
    03.  ;(function() {
    04.  function loadHandler() {
    05.  var hf = $get('ctl08_TSSM');
    06.  if (!hf._RSSM_init) { hf._RSSM_init = true; hf.value = ''; }
    07.    hf.value += ';Telerik.Sitefinity.Resources, Version=5.0.2800.0, Culture=neutral,
    08.    PublicKeyToken=null:en:7ede...:dff30785';
    09.    Sys.Application.remove_load(loadHandler);
    10.  };
    11.  Sys.Application.add_load(loadHandler);
    12.  })();//]]>
    13. </script>
    14. </form>
    15.</body>
    16.</html>

    And we end with one scriptblock for Telerik.Sitefinity.Resources...

    ---

    So if I cut out anything between the <div id="PublicWrapper" class="sfPublicWrapper"></div> because that's template related, I'm seeing 33 lines in my source code, I'd say doesn't get any cleaner than that.

    ---

    If you're seeing a lot of 'garbage' and extra stuff loaded, you probably have 'Browse and edit' turned on. That function makes it possible to edit a page on the frontend, but also forces alot of additional functionality and style to be loaded.

    You can easily turn it off by logging into the BackEnd and go to Administration >> Advanced >>  Pages and then scroll down to the label called "Enable in-line editing." Set it to false, restart your system and it should be as clean as a whistle...

    Jochem.


  4. payam
    payam avatar
    8 posts
    Registered:
    19 Jul 2012
    07 May 2012
    Link to this post
    Hi
    I created a page with no theme and no widget. This is the page source:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><meta name="Generator" content="Sitefinity 5.0.2800.0 PU" /><title>
        test
    </title></head>
    <body>
        <form method="post" action="" id="aspnetForm">
    <div class="aspNetHidden">
    <input type="hidden" name="ctl04_TSM" id="ctl04_TSM" value="" />
    <input type="hidden" name="ctl05_TSSM" id="ctl05_TSSM" value="" />
    <input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" />
    <input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="" />
    <input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUKMjEyNzIxOTUyOGRk10G04A7jAvosbzABpJX8Evs4nTt/p9/CrLneGozMKmc=" />
    </div>
     
    <script type="text/javascript">
    //<![CDATA[
    var theForm = document.forms['aspnetForm'];
    if (!theForm) {
        theForm = document.aspnetForm;
    }
    function __doPostBack(eventTarget, eventArgument) {
        if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
            theForm.__EVENTTARGET.value = eventTarget;
            theForm.__EVENTARGUMENT.value = eventArgument;
            theForm.submit();
        }
    }
    //]]>
    </script>
     
     
    <script src="/WebResource.axd?d=_fUZrU4ZABrdXgV86pb7OrJ6pqOC257WMglDd6XvPo-zep6fghCkdIU4YHeA_MaUnZP58J68PMuC4LKfyvoicDZGp9kbRJGutfnfu983API1&t=634635438940000000" type="text/javascript"></script>
     
     
    <script type="text/javascript">
    //<![CDATA[
    var __cultureInfo = {"name":"fa","numberFormat":{"CurrencyDecimalDigits":2,"CurrencyDecimalSeparator":"/","IsReadOnly":true,"CurrencyGroupSizes":[3],"NumberGroupSizes":[3],"PercentGroupSizes":[3],"CurrencyGroupSeparator":",","CurrencySymbol":"ريال","NaNSymbol":"NaN","CurrencyNegativePattern":3,"NumberNegativePattern":3,"PercentPositivePattern":0,"PercentNegativePattern":0,"NegativeInfinitySymbol":"-Infinity","NegativeSign":"-","NumberDecimalDigits":2,"NumberDecimalSeparator":".","NumberGroupSeparator":",","CurrencyPositivePattern":2,"PositiveInfinitySymbol":"Infinity","PositiveSign":"+","PercentDecimalDigits":2,"PercentDecimalSeparator":".","PercentGroupSeparator":",","PercentSymbol":"%","PerMilleSymbol":"‰","NativeDigits":["۰","۱","۲","۳","۴","۵","۶","۷","۸","۹"],"DigitSubstitution":0},"dateTimeFormat":{"AMDesignator":"ق.ظ","Calendar":{"MinSupportedDateTime":"\/Date(-62135568000000)\/","MaxSupportedDateTime":"\/Date(253402300799999)\/","AlgorithmType":1,"CalendarType":12,"Eras":[1],"TwoDigitYearMax":2029,"IsReadOnly":true},"DateSeparator":"/","FirstDayOfWeek":6,"CalendarWeekRule":0,"FullDateTimePattern":"dddd, MMMM dd, yyyy hh:mm:ss tt","LongDatePattern":"dddd, MMMM dd, yyyy","LongTimePattern":"hh:mm:ss tt","MonthDayPattern":"MMMM dd","PMDesignator":"ب.ظ","RFC1123Pattern":"ddd, dd MMM yyyy HH\u0027:\u0027mm\u0027:\u0027ss \u0027GMT\u0027","ShortDatePattern":"MM/dd/yyyy","ShortTimePattern":"hh:mm tt","SortableDateTimePattern":"yyyy\u0027-\u0027MM\u0027-\u0027dd\u0027T\u0027HH\u0027:\u0027mm\u0027:\u0027ss","TimeSeparator":":","UniversalSortableDateTimePattern":"yyyy\u0027-\u0027MM\u0027-\u0027dd HH\u0027:\u0027mm\u0027:\u0027ss\u0027Z\u0027","YearMonthPattern":"MMMM, yyyy","AbbreviatedDayNames":["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],"ShortestDayNames":["ح","ن","ث","ر","خ","ج","س"],"DayNames":["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],"AbbreviatedMonthNames":["جانفييه","فيفرييه","مارس","أفريل","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""],"MonthNames":["جانفييه","فيفرييه","مارس","أفريل","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""],"IsReadOnly":true,"NativeCalendarName":"تقويم ميلادى (برگردان فرانسه)‏","AbbreviatedMonthGenitiveNames":["جانفييه","فيفرييه","مارس","أفريل","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""],"MonthGenitiveNames":["جانفييه","فيفرييه","مارس","أفريل","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""]},"eras":[1,"م",null,0]};//]]>
    </script>
     
    <script src="/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl04_TSM&compress=0&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d4.0.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3afa%3ad2f0aeee-1e9c-4c5a-9bc8-8a3b98ca0121%3aea597d4b%3ab25378d2" type="text/javascript"></script>
    <script type="text/javascript">
    //<![CDATA[
    if (typeof(Sys) === 'undefined') throw new Error('ASP.NET Ajax client-side framework failed to load.');
    //]]>
    </script>
    <script type="text/javascript">
    //<![CDATA[
    Sys.WebForms.PageRequestManager._initialize('ctl04', 'aspnetForm', [], [], [], 90, '');
    //]]>
    </script>
    <input type="hidden" name="ctl04" id="ctl04" />
    <script type="text/javascript">
    //<![CDATA[
    Sys.Application.setServerId("ctl04", "ctl04");
    Sys.Application._enableHistoryInScriptManager();
    //]]>
    </script>
    <iframe id="__historyFrame" src="/ScriptResource.axd?d=-jpwtPgmDR0SCE904_4krzNs9HVOI9oEM9G9yx9Himoh8dnkl93NyGkIua9N6a6TOZmqNRRTRmxMPvJ60VHSeA2" style="display:none;">
     
    </iframe>
     
            <div id="PublicWrapper" class="sfPublicWrapper">
                 
            </div>
        </form>
    </body>
    </html>

  5. Jochem Bökkers
    Jochem Bökkers avatar
    787 posts
    Registered:
    13 Aug 2007
    07 May 2012
    Link to this post
    Hey Payam,

    Ah I see what you mean - in that case under Administration >> Advanced >>  Pages you have got 'Combine script resources' and 'Combine style sheet resources' set to true.

    These are just above the other setting you just changed. At the moment there are some quirks with double and hefty loading when you've got these two turned on...

    Jochem

  6. payam
    payam avatar
    8 posts
    Registered:
    19 Jul 2012
    11 May 2012
    Link to this post
    Hi Jochem,

    I guess these options control how script and stylesheet references is added to page. They don't remove any script or stylesheet from page. I didn't change any sitefinity settings and i am using a clean sitefinity installation.

    Payam
  7. Robert
    Robert avatar
    7 posts
    Registered:
    03 Feb 2012
    16 May 2012
    Link to this post
    @jochem,

    I did Enable in-line editing set to false, restart my website using SF Project Manager but still the  ScriptResource.axd files does not get removed. Mine has 18 ScriptResource files that's blocking the loading time of my page as shown in Firebug Net panel. It just disable showing the in-line editing tool but not removing these ScriptResource.axd files.
  8. Jochem Bökkers
    Jochem Bökkers avatar
    787 posts
    Registered:
    13 Aug 2007
    16 May 2012
    Link to this post
    Hey Robert,

    Just tried again and take a look at the first screenshot...

    Top left: you see the (no theme/no template) page, 1 request, 951 bytes with on the right its source (21 lines).
    Bottom left: you see the same page, only with the 'default settings' pulling 9.10Kb with 10 request and the page source being 252 lines.

    * My Chrome installation has an extension that calls detector.js this has nothing to do with Sitefinity so this doesn't count towards requests

    All this, by setting 3 options to 'False' under Administration>>Settings>>Advanced and then Pages. (see 2nd screenshot).

    ---
    Naturally there's no scriptmanager / msajax or anything loaded on the top example, but since Payam originally complained about Sitefinity not outputting optimal html - this is just to show that it can output the cleanest html possible but by default it adds functionality, which naturally comes at a cost.

    Jochem
  9. jonathan
    jonathan avatar
    2 posts
    Registered:
    10 Nov 2015
    10 Nov 2015
    Link to this post

    hi i see optimization pages in sitefinity , and i see lot of code that i dont need, i use tawdis.net and i see that page home have and error this error in this line

    i want to solution this, but i dont know, how to fix this, please provide info where can i fix this or dissapear this code, i am new in sitefinity and .net, thanks

    137. <input type="hidden" name="ctl00$ctl02" id="ctl02" />
    138. <script type="text/javascript">
    139. //<![CDATA[
    140. Sys.Application.setServerId("ctl02", "ctl00$ctl02");
    141. Sys.Application._enableHistoryInScriptManager();
    142. //]]>
    143. X</script>

     

    the x is the error, but i dont know, i read the solution is use the 4 version but i use the version 6.0, thanks

9 posts, 0 answered