Home > Article > Web Front-end > Javascript implements flash sale, group purchase and countdown display record sharing_javascript skills
Recently I did a flash sale on real estate, an e-commerce website for group purchases (there are also flash sales on houses, the price is not small), there is a countdown display of the flash sale, mainly to determine how much time is left between the current time and the start of the flash sale, and also There are various displays showing the start of the flash sale and the end of the flash sale.
The most important point is that the so-called current time cannot use the client time obtained by the browser through new Date(). In this way, as long as the user modifies his or her machine time, the countdown will be messed up, so the current time must be The server time is used, so a static cache page is used, so the current time is obtained using ajax