Who knows how this offline access is realized?

  node.js, question

For example, open a web page, which contains some lists, such as: space, us, you and their four lists. Each list opens a modal window to load content and comment content. For example, there are two comments about space, space is beautiful and space is great.

I found that some websites can be accessed like this. First, empty the cache. Then open the list, cut off the network at this time, and then click on the list to open the modal window, and the comments also exist.

How did this happen? Do you cache the comments and list contents into js files when accessing the list?

The website is implemented with nodejs angularjs.

What is this characteristic? Nodejs data caching technology? Or is it angularjs’s data caching technology?

It should be a simple memory object, a common phenomenon of front-end Single page application (state/data management).

Not the magic of node or angular.

If you drop a few pieces of data at a time and click again, you will not request data.

According to your description, when you open the list, you will initiate a request, get the data, and assign a value to oneVariable, JS inside their Life cycle until this tab is closed. (You can open F12 to observe this request)

If you want to know more advanced topics, you can refer to the relevant knowledge of Single page application.

  • Store mode

  • mvvm