Results 1 to 3 of 3

Thread: [4.2.0 beta 2] ComponentLoader: should not disableCaching be overridden?

  1. #1
    Sencha User Daniil's Avatar
    Join Date
    Jun 2010
    Location
    Saint-Petersburg, Russia
    Posts
    1,017
    Vote Rating
    125
      0  

    Default [4.2.0 beta 2] ComponentLoader: should not disableCaching be overridden?

    REQUIRED INFORMATION

    Ext version tested:

    • Ext 4.2.0 beta 2

    Browser versions tested against:
    • Chrome

    DOCTYPE tested against:
    • <!DOCTYPE html>

    Description:
    • I see ComponentLoader inherits an ElementLoader's disableCaching. This destination "Appends current timestamp to script files to prevent caching." of the disableCaching option seems not be actual for a ComponentLoader. But should not it be overridden to pass it as an option of an AJAX request?
    • Setting up a disableCaching option in an ajaxOptions works.

    Steps to reproduce the problem:
    • Just run the sample

    The result that was expected:
    • No "?_dc=..." in the URL

    The result that occurs instead:
    • There is "?_dc=..." in the URL regardless the "disableCaching: false" setting.

    Test Case:
    Code:
    <!DOCTYPE html>
    <html>
    <head>
        <title>Loader disableCaching</title>
    
        <link rel="stylesheet" href="../resources/css/ext-all.css" />
        
        <script src="../ext-all-debug.js"></script>
    
        <script>
            Ext.onReady(function () {
                Ext.create('Ext.panel.Panel', {
                    renderTo: Ext.getBody(),
                    loader: {                    
                        url: '/Test/GetItems',
                        renderer: 'component',
                        disableCaching: false,
                        autoLoad: true
                    }
                });
            });
        </script>
    </head>
    <body>
    
    </body>
    </html>
    Object.NET
    Frameworks and Tools for .NET Developers
    --------------------------------------------------
    Ext.NET - Ext JS for ASP.NET - Examples | Twitter
    Bridge.NET - Write C#. Run JavaScript! - Live | Twitter
    --------------------------------------------------

  2. #2
    Sencha User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    18,984
    Vote Rating
    933
      0  

    Default

    Not totally sure what you're saying, disableCaching isn't an option on ElementLoader or ComponentLoader. Are you suggesting that it be added so you don't need to specify ajaxOptions?
    Twitter - @evantrimboli
    Former Sencha framework engineer, available for consulting.
    As of 2017-09-22 I am not employed by Sencha, all subsequent posts are my own and do not represent Sencha in any way.

  3. #3
    Sencha User Daniil's Avatar
    Join Date
    Jun 2010
    Location
    Saint-Petersburg, Russia
    Posts
    1,017
    Vote Rating
    125
      0  

    Default

    Thank you for the answer.

    Seems, I posted in rush. I looked at the singleton Ext.Loader and was sure this option is available for ElementLoader as well.

    So, it is rather my mistake. I think "ajaxOptions" is good enough. Maybe, a separate option would be useful, but I am not sure.

    Please close the thread if you wish.

    P.S. Could you take a look at this one? Just it is already answered and I am afraid it can escape of your attention. Thank you.
    http://www.sencha.com/forum/showthread.php?255370
    Object.NET
    Frameworks and Tools for .NET Developers
    --------------------------------------------------
    Ext.NET - Ext JS for ASP.NET - Examples | Twitter
    Bridge.NET - Write C#. Run JavaScript! - Live | Twitter
    --------------------------------------------------

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •