Author Topic: Caching question  (Read 335 times)

pbassey

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 36
    • View Profile
Caching question
« on: December 18, 2022, 08:38:30 pm »
Is there a way to clear the browser cache for the pg grid pages?  It appears that my grid pages are being cached even though code changes would/should refresh the values of the grid.  It is only when (in Safari) I select the Develop/Empty Caches function to I see code changes (at times).  Once that cache is cleared, subsequent code/data changes do appear.  I have added the html meta tags that should be preventing the coeb pages from ever getting cached (below), but I am however seeing my pages cached despite these below:

<html>
   <head>
   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
   <meta http-equiv="X-UA-Compatible" content="IE=edge">
   <meta http-equiv='cache-control' content='no-cache'>
   <meta http-equiv='expires' content='0'>
   <meta http-equiv='pragma' content='no-cache'>   
   </head>

   Web page code here....

</html>
       
Any suggestions would be greatly appreciated

-P
     

pbassey

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 36
    • View Profile
Re: Caching question
« Reply #1 on: December 19, 2022, 09:44:48 pm »
I discovered that by setting the cache value to false under the data model section, I seem to of solved my problem.

var dataModel = {
   cache: false,
   location: "remote",                                   
   sortDir: "down",
   sorting: "local",                       
   dataType: "xml",
   recIndx: "recID",
   url: "/sts/content/files/data/rawdata.xml",
   
   getData: function (dataDoc) {
      var obj = { itemParent: "item", itemNames: ["recID", "GLAccount", "GLName", "OrigAmt", "pctToTotal", "Fund", "Currency", "USD", "SAPDesc", "totpayable" ] };
         return { data: $.paramquery.xmlToJson(dataDoc, obj) };
      }
};


Thanks,
Peter