This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
Software Updates for SproutCore Applications
Ideally, you want your SproutCore applications to be fully cacheable in production. Only your Ajax/XHR requests get data that could change from launch to launch.
This presents a problem when you need to update your application frequently. Here’s what I do:
- I make my SproutCore applications cacheable “forever”.
- In
clients/my_app/core.js, I include a numericversionproperty, which I keep synchronized with my server. - Whenever I return an Ajax request from my server, I also send back the
versionproperty. In my Ajax response processing code, I check the value ofversionin the response; if it’s later than the one stored in my SproutCore application, Irefresh()the page, loading the latest version of my SproutCore application.
This process is almost completely transparent to the user, and gives you maximum cache-ability.
NOTE: If you have unsaved data that the user could lose, you’d probably want to alert the user and give them a chance to save their data first before you
refresh()the page.
Comments
This sounds great, but it needs more detail for beginners. Can you post your code to a gist and provide more detailed explanation of how your code works?






