jeudi 29 octobre 2015

Is it possible to download only the HEAD tag of a page?

I've done some research about this and had no conclusive answer.

This question lays some of the path through it: How can I download only part of a page?

But then again, I don't want to download only a random part of a page, but one of the first tags, the head.

Is it possible somehow to query the page, and stream it's content to a buffer and stop downloading (discarding the rest) as soon as you find the tag closer </head> ?

EDIT: Adding stuff to the page itself is not possible, since I want to pull the header of websites on my app.

Imagine http://ift.tt/gbk8l4 is entered as the parameter. The whole page is around 240kb, but if I stop downloading the moment I hit </head>, it's only 5kb. Allowing me to save around 97% bandwidth for this page.




Aucun commentaire:

Enregistrer un commentaire