I am working on an ecommerce website and is observing some strange behaviour while accessing the website on safari browser. The home page of our website has 4 web service calls which gets invoked once the page is loaded. One of them is a session related call. When I access this page on safari browser and try refreshing the page couple of times, even before the page is loaded, I am seeing those 4 webservice calls coming to the webserver from my browser. And once the the page is loaded, I see the same 4 web service calls being made from the browser, which is expected. In the network tab of the developer tools as well, I am only seeing the second set of web service calls.
I am not able to figure out how and from where the initial set of web service calls are being made. In one of the service call we have a custom header being passed, which changes based on the session id. When these ghost service calls are being made, i can seee that the request headers corresponds to some earlier values, and it completely breaks our user session managment. It appears as if the browser is trying to retry some calls which were made earlier.
Any pointers on this will be highly appreciated
I was further debugging this using charles proxy. charles proxy pretty much helps monitor every request that is being issued from the browser. In charles proxy I am seeing two set of service calls while in the browser network panel I am seeing only one set. This further reinforces the assumption that the browser is retrying the calls made earlier while loading the page.
Also confirmed that these addtional service calls is not being made through code. I had console logs and break point in the code which make the service calls, and both these doesn't reflect the additional set of service calls that are seen in charles proxy/server logs