Analysis and solution of the problem caused by the cache between different networks

Source: Internet
Author: User
Tags browser cache

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.