PhantomJsCloud - Documentation
Once a resource is loaded, it is normally cached.
This means that another page request that loads the same resource will not make a
network request,
and thus there will not be any load for us to record in the
pageResponses.events section.
To force all resources to load, you should pass the
pageRequest.requestSettings.clearCache:true parameter.
This is also helpful if you are making changes to the resource and want to make sure the
newest version is the one used by your call to PhantomJsCloud.
Below is an example of what you would see in the pageResponses.events
section of your JSON response,
if the resource being loaded is https://example.com/resource.css:
{
"key": "resourceRequested",
"time": "2016-05-24T15:36:50.376Z",
"value": {
"resourceRequest": {
"headers": "OUTPUT SUPPRESSED (Disabled to reduce verbosity of your JSON. You can enable by removing the related entry in your pageRequest.suppressJson settings)",
"id": 172,
"method": "GET",
"time": "2016-05-24T15:36:50.376Z",
"url": "https://example.com/resource.css"
}
}
},
{
"key": "resourceReceived",
"time": "2016-05-24T15:36:50.482Z",
"value": {
"resourceResponse": {
"body": "",
"bodySize": 3654,
"contentType": "application/javascript",
"headers": "OUTPUT SUPPRESSED (Disabled to reduce verbosity of your JSON. You can enable by removing the related entry in your pageRequest.suppressJson settings)",
"id": 172,
"redirectURL": null,
"stage": "start",
"status": 200,
"statusText": "OK",
"time": "2016-05-24T15:36:50.482Z",
"url": "https://example.com/resource.css"
}
}
},
{
"key": "resourceReceived",
"time": "2016-05-24T15:36:50.492Z",
"value": {
"resourceResponse": {
"contentType": "application/javascript",
"headers": "OUTPUT SUPPRESSED (Disabled to reduce verbosity of your JSON. You can enable by removing the related entry in your pageRequest.suppressJson settings)",
"id": 172,
"redirectURL": null,
"stage": "end",
"status": 200,
"statusText": "OK",
"time": "2016-05-24T15:36:50.491Z",
"url": "https://example.com/resource.css"
}
}
},
{
"key": "resourceReceived",
"time": "2016-05-24T15:36:50.492Z",
"value": {
"url": "https://example.com/resource.css",
"status": 200
}
},