I am trying to speed up my Meteor application by only loading enough content of a webpage to get the <head>
tag of its HTML, to obtain its title, image, and description.
I have a client calling a server-side method with the following code:
Meteor.call("metaGetter", url, function(err, res){...});
And on the server side, in the metaGetter
method, I am using Meteor's HTTP.call:
var result = HTTP.call('GET', url, {headers: {'content-range': "bytes 0-100"}});
as written in Meteor's documentation. I am able to get the result's content, html. However, after printing the returned headers, I do not see the content-range
attribute that I have tried to set.
Edit: Akshat's solution works, but only for some websites, very few in fact. Any help would be much appreciated.