As more and more intelligent sensors and sensing applications are equipped with, smartphones are becoming smarter and play a greater role in people's lives. However, due to mobile platform diversity, the development and deployment of a context-aware application for different mobile devices are time-consuming and expensive, which in fact limits the large-scale application of context-aware technology in mobile heterogeneous environments. Unlike native applications, web applications are easy to develop, upgrade and deploy, and almost all smartphones today include a web browser for supporting running them. Another difference is that native applications can capture context information by accessing sensors available on the mobile device, but web applications running in the browser cannot. In this paper, we describe CaMWAF, a framework designed to support the rapid development of context-aware mobile web applications and simplify the exchange of context information in heterogeneous environments. With CaMWAF, developing a context-aware application is no longer a difficult and timeconsuming task. In consideration of the resource limitation of mobile devices, the proposed framework delegates the computationally expensive tasks to the server, while enables the context-aware mobile applications to query and subscribe high-level context information in an easy and lightweight manner.