From: Agnibho Mondal Date: Sun, 11 Dec 2016 10:40:13 +0000 (+0530) Subject: Minor corrections X-Git-Url: https://code.agnibho.com/repo?p=pdosage.git;a=commitdiff_plain;h=6efc6bf0129a6c1c4be82eb0feaf84ca2728ee7f Minor corrections --- diff --git a/src/main.js b/src/main.js index 55c918f..a2673dc 100644 --- a/src/main.js +++ b/src/main.js @@ -72,10 +72,13 @@ new Vue({ } } try{ - loc=JSON.parse(localStorage.getItem("pdosage_data")); - if(loc.timestamp>data.timestamp){ + var loc=JSON.parse(localStorage.getItem("pdosage_data")); + if(loc.version>data.version){ this.dosage=new Dosage(loc.dosage); } + else{ + localStorage.setItem("pdosage_data", JSON.stringify(data)); + } } catch(e){ if(!this.dosage){ diff --git a/src/routine.js b/src/routine.js index a23f329..11a4242 100644 --- a/src/routine.js +++ b/src/routine.js @@ -24,6 +24,8 @@ **********************************************************************/ $(document).ready(function(){ + //Disable cache + $.ajaxSetup({"cache": false}); //Remove loader $(".loader").remove();