I have an HTML page on my local get_description.html- 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 srciframe is set to the URL entered in the text box. The pages extracted in this way are very large with lots of linked files. On the page, I am interested in the block of text contained in the element <div id="description">.
Is there a way to reduce the loading of resources related to the page that loads in the iframe?
I do not want to use curl, because the data is available only to registered users, and the steps that need to be done with curl to get the content are too complicated. Iframe is simple because I use it in a window that sends the necessary cookies to identify the request as coming from the logged in user, but the problem is that it is very wasteful to get almost 1 MB of data to save them 1 KB and throw out the rest.
edit
If the proposed method only works in Firefox, then this is normal, so I added the Firefox tag. In addition, it is possible that the answer actually belongs to the field of additional methods of Firefox, so I added this tag.
The problem is not that I cannot get what I am looking for, but rather the problem is that a simple method is iframewasteful.
, Firefox . Ctrl + U, " ". , , , , . , .
Adblock. - , . Javascript . , .