chiranjib 的个人资料Exploring The Knowledge照片日志列表更多 ![]() | 帮助 |
|
6月1日 Google Gear![]() Only Offline!!! One of the most frequently requested features for Google's web applications is the ability to use them offline. Unfortunately, today's web browsers lack some fundamental building blocks necessary to make offline web applications a reality. In other words, we found we needed to add a few new gears to the web machinery before we could get our apps to run offline. Gears is a browser extension that we hope -- with time and plenty of input and collaboration from outside of Google -- can make not just our applications but everyone's applications work offline. Going OfflineThe first thing you need to run a web application offline is the ability to start it without an Internet connection. This is the purpose of the LocalServer module. The LocalServer API and the manifest file are the key components that cache your application's resources and make it available offline. Storing User's DataApplications that are more than just static files have data that is
typically stored on the server. For the application to be useful
offline, this data must be accessible locally. The Database module provides a relational database for storing data. When an offline application reconnects, you will need to synchronize
any changes made in the local database with the server. There are many
different approaches to synchronizing data, and there is no single
perfect approach. An additional feature of the Google Gears database is Full-Text Search, providing a fast way to search text within a database file. PerformanceWhen synchronizing large amounts of data, you may find that the database operations begin to affect the responsiveness of the browser. The WorkerPool allows you to move your database operations to the background to keep the browser responsive. Google Gears Installation Your web application needs to detect whether or not Google Gears is installed on a user's machine before calling the APIs, and also to determine when to display an installation prompt to the user. Always initialize Google Gears using Note: Always use gears_init.js to access Gears. Other uses may not be supported in the future.
Use the URL in the code above to access the Google Gears installation page. Substitute your customized message and your URL in the parameters. Parameters:
评论 (1)
引用通告此日志的引用通告 URL 是: http://chiranjibtech.spaces.live.com/blog/cns!5FA626CE469BF89C!197.trak 引用此项的网络日志
|
|
|