tomindo Posted November 11, 2011 Share Posted November 11, 2011 Hi guys I got an issue that when a link on the site is loading, the other links does not load until the previous is complete but it will work if i try on 2 different browsers. How can i browse multiple links silmultanously? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/250942-multi-url-browsing/ Share on other sites More sharing options...
freelance84 Posted November 11, 2011 Share Posted November 11, 2011 I'm not sure I've got you exactly however I do recall somewhere in some dusty memories that a browser has a limit to the number of items it can simultaneously download from any one domain at a time (6 items rings a bell but don't quote me on that). That might explain a little, on the assumption I understand you correctly. Quote Link to comment https://forums.phpfreaks.com/topic/250942-multi-url-browsing/#findComment-1287395 Share on other sites More sharing options...
tomindo Posted November 11, 2011 Author Share Posted November 11, 2011 i have tried on chrome and firefox , not working for even 2 items. Basically, i have a php script on the site which will take like 1 minute to finish loading so during this time when i try to browse other links on the same browser they won't load at all until the 1 minute script done. There must be something to do with php session Quote Link to comment https://forums.phpfreaks.com/topic/250942-multi-url-browsing/#findComment-1287400 Share on other sites More sharing options...
ManiacDan Posted November 11, 2011 Share Posted November 11, 2011 This is due to session locking. The session file is locked by the first script and won't be unlocked until the script is finished (or calls session-write-close). Your second script, therefore, has to wait for the lock to be released before session_start can be called reliably. Your solutions are: 1) Fix that page that takes so damn long, no web page should take more than a second or two to execute. 2) Don't use sessions in the first page. 3) Unlock the session in the first page before you begin your long-running operation. Do not attempt to assign anything to a session variable after you do this on that first page. 4) Rewrite your session handling so the scripts can read/write in parallel. (Note: You are not good enough to do this one). Quote Link to comment https://forums.phpfreaks.com/topic/250942-multi-url-browsing/#findComment-1287404 Share on other sites More sharing options...
tomindo Posted November 15, 2011 Author Share Posted November 15, 2011 thanks guys I fixed the issue by removing that page off the session Quote Link to comment https://forums.phpfreaks.com/topic/250942-multi-url-browsing/#findComment-1288177 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.