Multiple PHP Requests Crashing Page
I'm using a JQuery/PHP script which displays 12 clocks on a page. The Javascript file calls a PHP file to determine the timezone offset, but with 12 clocks to display, 12 PHP reque
Solution 1:
If the problem is that your server cannot handle the simultaneous requests, there are a few options:
- Only call your php script once and send the information of all clocks at once. You can have your script return a json object that contains all offsets. This is what I would do.
- Call the function when the previous version has finished (in the callback or have it return a promise). Possible, but overly complicated and you will hit your server still with an extra request for each clock.
Post a Comment for "Multiple PHP Requests Crashing Page"