I currently have some code using jQuery Deferred and ajax to call remote api and get the data and put in localStorage and get data from localStorage. This code seems buggy the first time it runs (i.e. it doesn’t render the data until browser refresh) but it works perfectly after that until the cache expires and same problem again the
Tag: jquery-deferred
How to fetch value from Promise object after promise has been resolved
Please note This is a contrived example. Problem I am unable to figure out how to return any kind of object/function for further downstream processing after shortAfterLongFunc completes. I can console.log from shortAfterLongFunc but that’s not what i require here. Fiddle Here Thanks for looking! UPDATE: Okay just to make my question slightly better…this is a simple use case I