How to solve the impact of api changes on SPA applications when the front end is released?

The

scenario goes like this: a single-page application with two pages An and B.

the backend changes the API of the B page (for example, the structure of the returned data has changed), and the front end also rewrites the way the B page reads the API. At this time, the backend and the front end release this change at the same time,

but there are always some users who have not exited the page (for example, the user opened page An a long time ago, but when he routed to page B on a single page, he still read API), in the old way. When ajax read API, it reported an error. How can this problem be avoided by publishing?

Apr.03,2021

this should not happen much, unless you have a large number of visits to your application. In this case, you can only consider adding a version of api. When launching the new API, keep the old API

.
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-1b3a931-2c21a.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-1b3a931-2c21a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?