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

  • Home
  • SEARCH
  • 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 1002553
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T07:50:50+00:00 2026-05-16T07:50:50+00:00

I have a html page on my localhost – get_description.html . The snippet below

  • 0

I have a html page on my localhost – get_description.html.

The snippet below is part of the code:

<input type="text" id="url"/>
<button id="get_description_button">Get description</button>
<iframe id="description_container" src="#"/>

When the button is clicked the src of the iframe is set to the url entered in the textbox. The pages fetched this way are very big with lots of linked files. What I am interested in the page is a block of text contained in a <div id="description"> element.

Is there a way to mitigate downloading of resources linked in the page that loads into the iframe?

I don’t want to use curl because the data is only available to logged in users and the steps to take with curl to get the content is too complicated. The iframe is simple as I use this on a box which sends the right cookies to identify the request as coming from a logged in user, but the problem is that it is very wasteful to get nearly 1 MB of data to keep 1 KB of it and throw out the rest.

Edit

If the proposed method just works in Firefox it is fine, so I added Firefox tag. Also, it is possible that the answer actually is from the realm of Firefox add-on techniques, so I added that tag as well.

The problem is not that I cannot get at what I’m looking for, rather, the problem is the easy iframe method is wasteful.

I know that Firefox does allow loading only the text of a page. If you open a page and press Ctrl+U you are taken to ‘view page source’ window, There links behave as normal and are clickable, if you click on a link in source view, the source of the new page is loaded into the view source window, without the linked resources being downloaded, exactly what I’m trying to get. But I don’t know how to access this behaviour.

Another example is the Adblock add-on. It somehow kills elements before they get loaded. With plain Javascript this is not possible. Because it only is triggered too late to intervene in good time.

  • 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-05-16T07:50:50+00:00Added an answer on May 16, 2026 at 7:50 am

    Actually I’ve seen Cross Domain jQuery .load request before, here: http://james.padolsey.com/javascript/cross-domain-requests-with-jquery/

    The author claims that codes like these found on that page

    $('#container').load('http://google.com'); // SERIOUSLY!
    
    $.ajax({
        url: 'http://news.bbc.co.uk',
        type: 'GET',
        success: function(res) {
            var headline = $(res.responseText).find('a.tsh').text();
            alert(headline);
        }
    });
    
    // Works with $.get too!
    

    would work. (The BBC code might not work because of the recent redesign, but you get the idea)

    Apparently it is using YQL wrapped into a jQuery plugin to do the trick. Now I cannot say I fully understand what he is doing there but it appears to work, and fits the bill. Once you load the data I suppose it is a simple matter of filtering out the data that you need.

    If you prefer something that works at the browser level, may I suggest Mozilla’s Jetpack framework for lightweight extensions. I’ve not yet read the documentations in its entirety but it should contain the APIs needed for this to work.

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

Sidebar

Ask A Question

Stats

  • Questions 515k
  • Answers 515k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer GLSL is OpenGL Shading Language. It is intended, originally, for… May 16, 2026 at 6:37 pm
  • Editorial Team
    Editorial Team added an answer You need to pass string bufer in lParam, and not… May 16, 2026 at 6:37 pm
  • Editorial Team
    Editorial Team added an answer I don't believe that it is possible to do what… May 16, 2026 at 6:37 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I have a html page displayed using... cherrypy.quickstart(ShowHTML(htmlfile), config=configfile) Once the page is loaded
I have created a html page in php and upon submission i validates that
I have a very basic AJAX function in JQuery: $.ajax({ url: http://www.google.com, dataType: html,
I am on the home page: http://localhost/ http://localhost/Home (yeah, this one too, though I
I have a noobish question. Probably a silly one. I have a static html
I have a web service that I have published locally. I wrote an HTML
I'm currently trying to learn HTML and Java EE Servlet programming. I have an
I have a masterpage that render's the following PartialView: <% Html.RenderPartial(AddPage); %> AddPage Controller
I have a simple page that contains an iframe. The iframe contains a page
I have written a code to add user into DB. I need to redirect

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.