WeChat Mini Programs problem-invokeWebviewMethod data transmission length of 1227297 has exceeded the maximum length of 1048576

recently, Mini Program is working on a project on article data analysis. At this stage, the article is displayed in Mini Program by climbing the official account of Wechat. The article content parsing plug-in used by Mini Program is wxParse, but when it is found that the data of the article is obtained through the interface (equivalent to the entire html source code, But excluding all script and style tags), there is a problem that the invokeWebviewMethod data transfer length of 1227297 has exceeded the maximum length of 1048576. In other words, the size of Mini Program"s data in a request cannot exceed 1m.

my own solution is:

the background splits and transmits the article of an article, and then Mini Program uses multiple wxParse to parse and display the article fragments, but I don"t know how to deal with the split transmission. For example, the structure of an article is as follows:

<html>
    <head>
    </head>
    <body>
        <div>
         <section>
             <div>
                 

</div> </section> </div> </body> </html>

for example, the above is the overall content of an article, with a size of more than 1m. At this time, it needs to be split and transferred to the front end, that is, the entire html code is intercepted. However, this interception rule and how to implement it cannot be implemented for the time being. I hope you can give us some help.


this error should not be caused by the request data being too large, but by the data being operated on when setData is too large. It is possible that the data returned by the request is too large, and you assign this large data to setData at one time.
solution: if there is a redundant part of the data (that is, the data that you do not need to use), you can only extract the data you need separately, and then assign and render it with setData. If all the data is needed, it is recommended that you split the large data before setData.
I hope my answer will help you.


Mini Program does not have to render Mini Program's webview to achieve the function you want, and it is not limited by the original container

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-7b939f-29e4b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-7b939f-29e4b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?