gitmyhub

VasSonic

Java ★ 12k updated 3y ago

VasSonic is a lightweight and high-performance Hybrid framework developed by tencent VAS team, which is intended to speed up the first screen of websites working on Android and iOS platform.

A Tencent framework that makes websites load faster inside mobile apps by pre-fetching page content in parallel with the browser view loading, and by caching only the parts of a page that change between visits.

JavaAndroidiOSNode.jsPHPsetup: hardcomplexity 4/5

VasSonic is a framework built by Tencent that makes websites load faster when they are displayed inside a mobile app on Android or iOS. Many apps show web pages inside their own browser view rather than redirecting users to a separate browser. VasSonic is designed to make those embedded web pages feel as fast as native app screens.

The core idea is that VasSonic starts fetching the web page before the app's browser view is even fully initialized. Instead of waiting for everything to be ready and then making a network request, the two things happen at the same time. This alone cuts down the time a user spends looking at a blank screen.

VasSonic also splits a web page into two parts: the template, which is the structural layout that rarely changes, and the data, which is the content that updates frequently. It caches the template locally and only downloads the parts that actually changed since the last visit. This means returning visitors get a much faster experience because only a small piece of data needs to travel over the network.

The framework works with both server-rendered static pages and dynamic pages. The server needs to follow the VasSonic specification to mark which parts of the HTML are template and which are data, but once that is in place the client side handles the rest automatically.

Server-side support is available for Java, Node.js, and PHP, and there are client SDKs for Android and iOS. Sample code and documentation are included for each platform.

Where it fits