App Cache and HTML5 History

Whilst developing our latest app (https://github.com/PaulKinlan/ioreader) for a Google IO, we ran into several large is limitations with AppCache and HTML5 History that I wanted to share (and at somepoint hopefully solve). Putting the current discussion of the issues with AppCache aside for a couple of minutes, there is no provision in HTML5 History to include pages “pushStated” into the current App Cache GroupConsider this flow: We have a multi paged app with pages A and B when rendered from the server sharing the same AppCache and thus in the same group.


This content originally appeared on Modern Web Development with Chrome and was authored by Paul Kinlan

Whilst developing our latest app (<a href="https://github.com/PaulKinlan/ioreader">https://github.com/PaulKinlan/ioreader</a>) for a Google IO, we ran into several large is limitations with AppCache and HTML5 History that I wanted to share (and at somepoint hopefully solve).  <p /><div>Putting the current discussion of the issues with AppCache aside for a couple of minutes, there is no provision in HTML5 History to include pages "pushStated" into the current App Cache Group<p /> </div><div>Consider this flow:  We have a multi paged app with pages A and B when rendered from the server sharing the same AppCache and thus in the same group.<ul><li>User visits page A, it uses an app cache, so everything is cached.</li> <li>User navigates from A to B, page B is added to the app cache group.</li><li>User goes offline</li><li>User refreshes A it is served from the Cache,  User refreshes B, it is served from the Cache.</li></ul>Update the AppCache, A and B are re-downloaded and cached [see: Death by App Cache].</div> <div>Now if we inject HTML5 History for the same flow:<ul><li>User visits page A, it uses an app cache, so everything is cached.</li><li>User navigates from A to B (via pushState) .....  currently B is not added to the App Cache group.</li> <li>User goes offline</li><li>User refreshes A it is served from the Cache,  User refreshes B, fail, because not in the Cache.</li></ul>I believe that as URL's change if the master page is App Cached, the new URL's should be added to the App Cache group.  You are still in the same application, the state is just dynamically changed but in essence you are on a page that should be available offline.  The act of changing the URL client-side normally enforces you to generate the correct content on the server if the page was simple fetched. <div> Death by App Cache: The problem that we also faced was as master entries are added to an App Cache group, when an update to the App Cache occurs, all those pages in the App Cache are refreshed, with more dynamic applications this could mean that 10's or 100's of pages are quickly downloaded by the App Cache software and thus can quickly cause a mini DDOS.<div> I am interested to hear your thoughts.</div></div></div>


This content originally appeared on Modern Web Development with Chrome and was authored by Paul Kinlan


Print Share Comment Cite Upload Translate Updates
APA

Paul Kinlan | Sciencx (2011-05-17T00:00:00+00:00) App Cache and HTML5 History. Retrieved from https://www.scien.cx/2011/05/17/app-cache-and-html5-history/

MLA
" » App Cache and HTML5 History." Paul Kinlan | Sciencx - Tuesday May 17, 2011, https://www.scien.cx/2011/05/17/app-cache-and-html5-history/
HARVARD
Paul Kinlan | Sciencx Tuesday May 17, 2011 » App Cache and HTML5 History., viewed ,<https://www.scien.cx/2011/05/17/app-cache-and-html5-history/>
VANCOUVER
Paul Kinlan | Sciencx - » App Cache and HTML5 History. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2011/05/17/app-cache-and-html5-history/
CHICAGO
" » App Cache and HTML5 History." Paul Kinlan | Sciencx - Accessed . https://www.scien.cx/2011/05/17/app-cache-and-html5-history/
IEEE
" » App Cache and HTML5 History." Paul Kinlan | Sciencx [Online]. Available: https://www.scien.cx/2011/05/17/app-cache-and-html5-history/. [Accessed: ]
rf:citation
» App Cache and HTML5 History | Paul Kinlan | Sciencx | https://www.scien.cx/2011/05/17/app-cache-and-html5-history/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.