VasSonic README

The project's README from github.com/Tencent/VasSonic. As one markdown file: README.md.

VasSonic: A Lightweight And High-performance Hybrid Framework

license PRs Welcome wiki

logo

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. Not only does VasSonic supports the static or dynamic websites which are rendered by server, but it is also compatible with web offline resource perfectly.

VasSonic uses custom url connection instead of original network connection to request the index html, so it can request resource in advance or parallel to avoid waiting for the view initialization. In this parallel case, VasSonic can read and render partial data by WebKit or Blink kernel without spending too much time waiting for the end of data stream.

VasSonic can cache html cleverly according to VasSonic Specification obeyed by client and server. VasSonic Specification specify template and data by inserting different comment anchor, templates are bigger parts of html which stay the same or changed rarely , in contradiction data, which is the smaller and constantly change part of html. According to this, VasSonic request less data by incremental updating templates and data, the websites are faster and feel more like native application. In conclusion, VasSonic effectively enhance the user experience and increase click rate, retention rate and other indicators.

Sonic is called for short in project.

Before VS After Using VasSonic

Pic 1: Before Using VasSonic Pic 2: After Using VasSonic
default mode VasSonic mode

Getting started

Getting started with Android

Getting started with iOS

Getting started with Java

Getting started with Node.js

Getting started with PHP

Getting started with React

Demo Downloads

  1. Here are the latest sample demo for Android and iOS.

Support

Any problem?

  1. Learn more from the following sample.
    Android sample
    iOS sample
    Java sample
    Node.js sample
    PHP sample
    React sample

  2. Read the following source code
    Android source code
    iOS source code
    Java source code Node.js source code
    PHP source code
    React source code

  3. Read the wiki for help.

  4. Contact us or scan QR code for help.
    QR code

Contributing

For more information about contributing issues or pull requests, see our VasSonic Contributing Guide.

License

VasSonic is under the BSD license. See the LICENSE file for details.

The End

If you are interested in VasSonic, don't forget to STAR it.

VasSonic's mission is MAKING WEB MUCH BETTER!

Thank you for reading ~

VasSonic (Tencent/VasSonic)

Searching Database…

11.8K ·GitHub
这是什么?VasSonic(简称 Sonic)是腾讯 VAS 团队推出的一个轻量级高性能混合开发框架,用于加快混合应用中 Android 和 iOS 网页首屏的加载速度。
这是我加到自己应用里的东西,还是跑在服务器上的?两者都是:它既是一个给 Android 或 iOS WebView 应用用的客户端框架,也需要一个遵循 VasSonic Specification 的服务器配合使用——入门指南涵盖了 Android、iOS、Java、Node.js、PHP 和 React。
我怎么把它加到我的应用里?按照你所用平台的入门指南操作——客户端是 Android 或 iOS,服务端是 Java、Node.js、PHP 或 React——也可以试试可下载的 Android 和 iOS 示例 demo 应用。
我的网站需要在服务端做改动,VasSonic 才能用吗?需要——提速靠的是智能缓存,只有客户端和服务器都遵循 VasSonic Specification 时才生效,所以现有网站在服务端需要做一些配合。
离线资源也能用吗?可以——除了由服务器渲染的静态和动态网站之外,VasSonic 也完全兼容网页离线资源。
VasSonic 是怎么让首屏变快的?它把普通的网络连接换成自定义的 URL 连接,让 HTML 请求提前发起,或者和视图初始化并行进行,而不是等初始化完成。之后 WebKit 或 Blink 内核会在数据流到达时就渲染部分数据,不必等整个响应返回。
缓存是怎么工作的?页面通过插入注释锚点把 HTML 拆成两部分:模板是较大的部分,内容不变或很少变化;数据是较小的部分,经常变化。客户端和服务器对这两部分做增量更新,因此请求的数据量大幅减少,页面体验更接近原生应用。
能带来多大的提升?README 声称能明显改善用户体验,并提高点击率、留存率等指标,还附带了默认模式和 VasSonic 模式的前后对比图。
Creator
Tencent
Size
15.8 MB
Stars
11.8K
Age
9y
Commits · 90 Days