H5 Multi-page and single-page problems in mixed app

1. In hybird development, you need to embed H5 pages. There are two cases:

1.1A page is a html, such as a store page (shop.html) and a personal center page (person.html).
1.2A html page corresponds to multiple interfaces, such as a single-page application packaged by vue or react, a store interface (index.html-sharp/shop) and a personal center page (index.html-sharp/person). Although the interface is different, it uses the same html.

add:

1.1Each H5 is separate, and there is no jump between H5s.
1.2 every time you enter H5 from ios or android, it is reloaded, there is no cache, and each time it is loaded for the first time

2. Which is better to use for the above two situations? My previous scenario was to configure webpack to generate multiple html files when the react project is packaged. Today, when I saw that my colleagues wrote this directly, I felt that it was also feasible and avoided the configuration. But I don"t know if there will be other situations such as slower loading speed.

Please give me some advice at the bottom

Mar.01,2021

each has its own advantages, that is, the difference between multiple pages and single pages.

< H2 > single page < / H2 >

Resources are requested only once, and the first time the page is loaded is a little slower, but other routes to jump to a single page will be smoother

< H2 > multiple pages < / H2 >

every time a page is loaded, resources are reloaded. There are fewer resources. Under normal circumstances, it should be a little faster than the first time a single page is loaded

< H2 > but < / H2 >

in the current network situation, unless it is the pursuit of millisecond response (or the case of a large number of page resources), the advantage of a single page (fluency) will be much greater than that of multiple pages (hybird forget SEO)

Menu