explaingit

tencent/vassonic

11,866JavaAudience · developerComplexity · 4/5Setup · hard

TLDR

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.

Mindmap

mindmap
  root((VasSonic))
    What it does
      Faster web in apps
      Pre-fetch on open
      Partial page cache
    How it works
      Template vs data split
      Parallel init and fetch
      Local cache reuse
    Platform support
      Android SDK
      iOS SDK
      Java server
      Node.js server
    Use cases
      Hybrid mobile apps
      Embedded web views
      Returning visitor speed
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Speed up embedded web pages inside an Android or iOS app by pre-fetching content before the browser view is fully initialized, eliminating the blank-screen delay.

USE CASE 2

Reduce data transfer for returning visitors by caching the static page template locally and only downloading the updated content sections on repeat visits.

USE CASE 3

Integrate VasSonic into a hybrid mobile app that shows server-rendered web pages so those pages feel as instant as native screens.

Tech stack

JavaAndroidiOSNode.jsPHP

Getting it running

Difficulty · hard Time to first run · 1day+

Both client SDK integration and server-side HTML annotation are required, the server must mark template versus data sections for caching to work.

In plain English

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.

Copy-paste prompts

Prompt 1
I'm integrating Tencent/VasSonic into an Android app that shows a web portal inside a WebView. Walk me through adding the VasSonic Android SDK, initializing it before the WebView opens, and handling the callback that delivers the pre-fetched HTML.
Prompt 2
Using VasSonic on the server side with the Node.js SDK, show me how to mark the HTML template sections with the required VasSonic annotation comments so the client SDK knows which parts to cache and which to refresh.
Prompt 3
I have a VasSonic-enabled Android app and want to verify the caching is working correctly. Help me write a test that makes two consecutive loads of the same URL and checks that the second load uses the cached template rather than re-downloading the full page.
Open on GitHub → Explain another repo

← tencent on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.