{"action":"closed","issue":{"url":"https://api.github.com/repos/ariya/phantomjs/issues/10183","labels_url":"https://api.github.com/repos/ariya/phantomjs/issues/10183/labels{/name}","comments_url":"https://api.github.com/repos/ariya/phantomjs/issues/10183/comments","events_url":"https://api.github.com/repos/ariya/phantomjs/issues/10183/events","html_url":"https://github.com/ariya/phantomjs/issues/10183","id":12085590,"number":10183,"title":"when more than one page is opened, that resources for each new page are requested more times than they should","user":{"login":"ariya","id":7288,"avatar_url":"https://avatars.githubusercontent.com/u/7288?v=3","gravatar_id":"","url":"https://api.github.com/users/ariya","html_url":"https://github.com/ariya","followers_url":"https://api.github.com/users/ariya/followers","following_url":"https://api.github.com/users/ariya/following{/other_user}","gists_url":"https://api.github.com/users/ariya/gists{/gist_id}","starred_url":"https://api.github.com/users/ariya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ariya/subscriptions","organizations_url":"https://api.github.com/users/ariya/orgs","repos_url":"https://api.github.com/users/ariya/repos","events_url":"https://api.github.com/users/ariya/events{/privacy}","received_events_url":"https://api.github.com/users/ariya/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ariya/phantomjs/labels/old.Priority-Medium","name":"old.Priority-Medium","color":"ededed"},{"url":"https://api.github.com/repos/ariya/phantomjs/labels/old.Status-New","name":"old.Status-New","color":"ededed"},{"url":"https://api.github.com/repos/ariya/phantomjs/labels/old.Type-Defect","name":"old.Type-Defect","color":"ededed"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2011-07-29T18:53:38Z","updated_at":"2015-04-19T19:00:04Z","closed_at":"2015-04-19T19:00:04Z","body":"_**[*mark.cu...@scrazzl.com](http://code.google.com/u/111822502563497831867/) commented:**_\r\n> Note: This might be related to https://groups.google.com/group/phantomjs/browse_thread/thread/3f7a76c88c4dbca7\r\n> but i doubt it. \r\n> \r\n> <b>Which version of PhantomJS are you using?</b>\n\r\n> Version 1.2.0\r\n> \r\n> <b>What steps will reproduce the problem?</b>\n1. Follow my code on http://pastebin.com/3AbWMGZz\r\n> 2. uncomment the lines at the top starting with urlList as specified to \r\n> test with multiple urls\r\n> 3. run the code phantomjs mycode.js\r\n> \r\n> <b>What is the expected output? What do you see instead?</b>\nExpected:\r\n> Report for http://www.chrischiu.com/testblank1 Load time 118 RequestsTotal : 1\r\n> Report for http://www.chrischiu.com/testblank2 Load time 117 RequestsTotal : 1\r\n> \r\n> Result:\r\n> Report for http://www.chrischiu.com/testblank1 Load time 118 RequestsTotal : 2\r\n> Report for http://www.chrischiu.com/testblank2 Load time 117 RequestsTotal : 1\r\n> \r\n> So to summarise, if you have 1 url. that url gets requested once. \r\n> If you have 2 urls, the first one gets requested once, the second one gets requested twice. (it continues on, the third 3 times and so on)\r\n> \r\n> Try this on any page with just a blank html content. if you try this on the same page multiple times you can see this however when printing the address, you won't be able to tell the difference between the page counts\r\n> \r\n> \r\n> \r\n> \r\n> <b>Which operating system are you using?</b>\nTested on : \r\n> ubuntu 11.04 phantom 1.2.0\r\n> OSX 10.7 (from brew) phantom 1.2.0\r\n> \r\n> <b>Did you use binary PhantomJS or did you compile it from source?</b>\nubuntu:\r\n> source via: http://code.google.com/p/phantomjs/wiki/BuildInstructions\r\n> sudo apt-get install libqt4-dev libqtwebkit-dev qt4-qmake\r\n>   git clone git://github.com/ariya/phantomjs.git &amp;&amp; cd phantomjs\r\n>   git checkout 1.2\r\n>   qmake-qt4 &amp;&amp; make\r\n> \r\n> OSX - brew\r\n> \r\n> <b>Please provide any additional information below.</b>\n\r\n> I'm fairly sure this is a problem with phantomjs but it could be a misunderstanding of the code. This is just one example of where something is definitely wrong.\r\n> \r\n> Originally the problem stemmed from trying to access \r\n> resource.endReply.status;\r\n> after loading has completed by doing a foreach on resources.\r\n> resource.endReply was null on some of them which caused the script to stop.\r\n> I wrote the example code to try and debug if something odd was happening somewhere.\r\n\r\n**Disclaimer:**\r\nThis issue was migrated on 2013-03-15 from the project's former issue tracker on Google Code, [Issue #183](http://code.google.com/p/phantomjs/issues/detail?id=183).\r\n:star2: &nbsp; **6** people had starred this issue at the time of migration."}}