Recently, the project encountered a very tangled problem, the company tested good things to the customer site on the issue of such a problem.
I. Description of the problem
Company Project for a B/s structure of the Web project, the client site with a browser login after the login on the return of the user name password error, and in the company test will not always appear this problem.
User Login Module Implementation Logic Description: The user login password is done after the RSA encryption processing transmission, in front of the login page needs to obtain encryption secret key, and then use the secret key to obtain the password to encrypt the background for the password verification, verification through the Allow login, verify that the error is prompted.
Second, the problem analysis
The program is a set, different is only the customer environment and the company environment difference. The first consideration may be that the secret key expires, refreshing the page to regain the secret key, this recruit in the company's network is completely useful, the customer site will be ineffective. The second reason may be the browser cache, cleaning browser cache Refresh page, the company can refresh to the latest page, but the customer site is not refreshed to the latest page, that the browser is broken, to change the browser or to refresh the latest page. In the browser directly download a modified JS file on the server, found that the download is also the previous version of the server, that is not a user computer or browser problems, should be the reason for the network. found that the customer site is the use of Unicom broadband, our server is deployed in the telecommunications room, online search, the network access between different operators is to be settled, and the settlement costs are high, especially Unicom access to telecommunications network, settlement costs exist a large deficit, I think, In order to reduce the number of access to the telecommunications to reduce the flow of access generated, Unicom built a set of its own network access caching mechanism, as long as the URL is unchanged, directly to the cache of the contents of the server, and not to the telecommunications network to obtain files. If the use of this caching mechanism, can also improve the efficiency of application services, if the use of bad will appear I encountered problems.
Iii. Problem-solving
General browser caching is through the URL as key to identify the existence of the cache, tried, Unicom cache server is so dry, to avoid it this cache is also very simple, as long as each launch of the URL request is not the same, such as the request to add a random number of parameters.
will be taken to the cache:http://ip:port/server/login
Cache not taken: http://ip:port/server/login?r= a random number