Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8726953
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T08:20:59+00:00 2026-06-13T08:20:59+00:00

I’m looking for a possibility to easily access and list all resources loaded after

  • 0

I’m looking for a possibility to easily access and list all resources loaded after a web page document has started to load: scripts, images, stylesheets, etc. using a headless browser. I’m interested in the files’ url, status code and type etc..

Think of a way to programmatically access the information the Network tab (developer tools) gives you:

enter image description here

Does anyone know of a Ruby library to help me with this or — even better — if there’s a way to achieve this using Capybara(–webkit) ?


Update

It seems that Poltergeist has a method called network_traffic which does what I’m after. Haven’t had the time to research it yet, though. I’ll report back once I do.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T08:21:00+00:00Added an answer on June 13, 2026 at 8:21 am

    As mentioned in an update, there seems to be a way to do this with Poltergeist (a Capybara driver). Here’s a quick and very “hackish” experiment:

    require 'rubygems'
    require 'capybara'
    require 'capybara/poltergeist'
    
    driver = Capybara::Poltergeist::Driver.new({})
    port   = Capybara::Poltergeist::Util.find_available_port
    server = Capybara::Poltergeist::Server.new(port, 30)
    client = Capybara::Poltergeist::Client.start(port,
      :path              => driver.options[:phantomjs],
      :window_size       => driver.options[:window_size],
      :phantomjs_options => driver.phantomjs_options
    )
    
    browser = Capybara::Poltergeist::Browser.new(server, client, nil)
    browser.visit('http://www.google.com/')
    
    browser.network_traffic.each do |request|
      # sorry, quick and dirty to see what we get:
      request.response_parts.uniq(&:url).each do |response|
        puts "#{response.url}: #{response.status}"
      end
    end
    
    => 
    
    http://www.google.com/: 200
    http://ssl.gstatic.com/gb/images/b_8d5afc09.png: 200
    http://www.google.com/images/srpr/logo1w.png: 200
    http://www.google.com/images/srpr/nav_logo80.png: 200
    http://www.google.com/xjs/_/js/hp/sb_he,pcc/rt=j/ver=FaiMBboaDLc.en_US./d=1/sv=1/rs=AItRSTMKxoHomLOW7ITf6OnfIEr5jQCEtA: 200
    

    This however is very slow and of course far from anything usable. I’m planning on digging deeper into Poltergeist to maybe do the same on a lower level.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm looking for possibility to define following options for Sharepoint list. I know it
I'm looking for a possibility to load the Java code dynamically into a class
I am looking for the possibility to copy all (backup) my address book entries
I am looking for a possibility to print parts of a returned JSON document
I am looking for a possibility within C/C++ to print a float (or double)
I'm looking into the possibility of integrating an Azure hosted .NET solution with Dynamics
I'm looking at the possibility of generating Java byte code at run time (hopefully
I'm looking for a possibility to get the color of a pixel with given
I've been looking at the possibility of ReHosting a WF4 Workflow to be used
I´m looking for a possibillity to prevent all functions from being executet while an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.