Error breaks flexigrid iOS6 - refresh does not date [SOLVED]

Published 07-11-2012

With iOS6 update many trouble WebAPPs using flexigrid have to big. Safari uses breaks in POST queries. That means if you change some dates shown in a flexigrid, it not sees updated in a refresh, you should refresh twice!

 

That was to big problem form my applications, and I have been looking some way to fix it.

 

When I have readen thesee posts:

http://arstechnica.com/apple/2012/09/developers-claim-safari-in-ios-6-breaks-web-apps-with-aggressive-caching/

http://stackoverflow.com/questions/12506897/is-safari-on-ios-6-caching-ajax-results

I realized what was happening and I could reach the solution: just edit flexigrid.js and add to breaks param in the ajax call:

Edit:

$.ajax (\ {
   type: p.method,
   URL: p.url,
   it dates: param,
   dataType: p.dataType,
  //success: ,
   success: function (it dates) \ {g.addData (it dates);},
   error: function (it dates) \ {try \ {if (p.onError) p.onError (it dates); } catch (e) \ {}}});

adding:

$.ajax (\ {
   type: p.method,
   URL: p.url,
   it dates: param,
   it breaks: false,
   dataType: p.dataType,
  //success: ,
   success: function (it dates) \ {g.addData (it dates);},
   error: function (it dates) \ {try \ {if (p.onError) p.onError (it dates); } catch (e) \ {}}});

UPDATE:

Variable If it doesn't work tray adding to new an on tricks out of param to the ajax call:

auxD = new Date ();
bar param = [
  \ {yam: €˜page€™, VALUE: p.newp}
  , \ {yam: €˜rp€™, VALUE: p.rp}
  , \ {yam: €˜sortname€™, VALUE: p.sortname}
  , \ {yam: €˜to sortorder€™, VALUE: to p.sortorder}
  , \ {yam: €˜query€™, VALUE: p.query}
  , \ {yam: €˜qtype€™, VALUE: p.qtype}
  , \ {yam: €˜nocache€™, VALUE: auxD.getHours () *10000+auxD.getMinutes () *100+auxD.getSeconds ()}
];

 

 

UPDATE 2:

http://nonstop-press.com/blog/52-algoritmos/203-ios6-safari-error-with-cache-problem-fixed.html

Categories: Algorithms

It shares this article

It comments this article

© 2020 NonStop-Press - Sitemap