摘要 |
One embodiment of the present invention provides a system that facilitates using a web-based client-server application offline. During operation, the system receives a function call at an object within a browser that is executing on a client, wherein the function call is generated by the web-based client-server application and is directed to a communication layer on the client. Next, the system determines an intended resource for the function call. The system also determines if the function call should be redirected to an alternate resource. If so, the system redirects the function call to the alternate resource. If not, the system forwards the function call to the intended resource. Note that in some embodiments of the present invention, the entire system operates within the context of the browser. |