NNKL.COM
welcome to my space
X
Search:  
 HOME   Client side caching
Client side caching
Published by: anonym 2009-01-08
Welcome to:nnkl.com

  • Hi,

    I have a problem with browser caching. I request some json formatted data that is relatively static, so I created a handler that returns the page with an ETag that contains a hash of the dataset. When I refresh this call in the browser and the data is unchanged, just the ETag is returned with status code 304: not modified.

    However, when I call this with Ext.Ajax, I alwas get a new call to the database:

    Ext.Ajax.request({
    url: 'PF.spIIMGetNews.pf?render=json',
    callback: function(options, success, response){

    var objResults = Ext.util.JSON.decode(response.responseText);
    window.alert('test:'+ objResults.rows[0].Date );

    }
    }); //Ext.Ajax.request

    I tried to use a HttpProxy, but this also results in a request to the database.

    I have a second question related to this. My caching works fine when I use a function CacheController.getURL (this comes from C. Gross book Ajax Patterns and Best Practices, Apress). It does correctly return me a json set and respects caching:

    CacheController.getURL( 'PF.spIIMGetNews.pf?render=json', myComplete);

    function myComplete( status, statusText, responseText, responseXML) {

    var objResults = Ext.util.JSON.decode(responseText);
    window.alert(objResults.rows[0].Date); // test json set

    }

    What I do not know is how I can load this json set to my jsonreader or store. I tried to use load and loadData but was not successful as yet. However, the data is there.

    Has anybody a brilliant idea?
    Thanks & have a nice weekend,
    Jan


  • Thanks Condor, you solved my problem.
    Jan


  • Use method: 'GET' and disableCaching:true.





  • I Am a Sinner – What About You?
    Global Sourcing and Supplier Online by Dylan

    You are looking at:nnkl.com's Client side caching, click nnkl.com to home
  • firefox goes mobile
  • unveiling of the world s first 2gb graphics card
  • 10 things the 3g iphone is still missing
  • se plans to aquire spice mobiles
  • gadwin printscreen 4 3
  • 8579 5 reasons to avoid iphone 3g 5 reasons to avoid iphone 3g
  • gmail adding protection and monitoring features
  • all nvidia g84 and g86s are defective
  • google open sources its internal data exchange language
  • gtx 260 and hd 4870 dropped to the same price
  • digi link conducts road shows in over 66 cities
  • mycolors 2 5 released
  • qoodaa has solved the problem of slow transfer speed of software outsourcing files
  • itunes activation servers go down iphone 3g customers being sent home unactivated
  •  
  • google s android developers thinking about abandoning android
  • first completely open source smartphone released
  • typos in intel web site e4700 with em64t or without em64t
  • windows vista is superior to leopard xp linux and all of open source
  • lively google now enters mmog smacks second life
  • accessing internet at 640 gb s wow
  • intel unveils centrino 2 technology for laptops
  • samsung aiming for water powered cellphones by 2010
  • canonical and valusoft bring ubuntu plus support to best buy
  • bharti joins hands with aiff to support football team
  • geforce 9800gtx for 199 and gtx280 for 449
  • moto to drop to fifth place
  • openoffice org 3 0 what to expect
  •  Homepage | Add to favorites | Contact us | Exchange links | LOGIN | Site map | 
    Copyright© 2008 nnkl.com        Site made:CFZ