I am using Net::HTTP.post_form to post cgi request to a website and get
answers.
Below is my code and I found that it always take about 30s to return the
result. I think my Internt connection is not so slow as I paste the same
cgi request url and run in my firefox, it will get result in less then
10 second.
So, how can I make the post_form returns quickly?
And, I also found many tags like in the returned html
file. Did the post_form download all those gif files? If so, how can I
discard all the image file and only get the text result?
And its running result:
Wed Aug 15 09:11:48 +0800 2007
Wed Aug 15 09:12:02 +0800 2007
I think this is slow since the post_form will not downloading pictures
in the post reply page. And when I type the url
‘http://finance.yahoo.com/q?s=GOOG’ in my firefox , it will show the
complete page including pictures in about 10s. If I configure the
firefox to not download pictures, it need only 4s. So,how I can I make
post_form reply more fast?
And its running result:
Wed Aug 15 09:11:48 +0800 2007
Wed Aug 15 09:12:02 +0800 2007
I think this is slow since the post_form will not downloading pictures
in the post reply page. And when I type the url
‘Alphabet Inc. (GOOG) Stock Price, News, Quote & History - Yahoo Finance’ in my firefox , it will show the
complete page including pictures in about 10s. If I configure the
firefox to not download pictures, it need only 4s. So,how I can I make
post_form reply more fast?
The same code takes less than a second for me. Perhaps it is your
connection?
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.