Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #35181
| From | Stanimir Stamenkov <s7an10@netscape.net> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: Q) Why is URLConnection not downloading all the renderable content for me? |
| Date | 2016-08-03 09:21 +0300 |
| Organization | A noiseless patient Spider |
| Message-ID | <nns2hl$kak$1@dont-email.me> (permalink) |
| References | <925a87d0-661e-4670-84e4-a9d2b9f9ea89@googlegroups.com> <nnp8qg$rec$1@dont-email.me> |
Tue, 2 Aug 2016 07:50:25 +0300, Stanimir Stamenkov:
> Sun, 31 Jul 2016 09:29:44 -0700 (PDT), sandeep6699@yahoo.com:
>
>> http://www.pollutionequipmentdirectory.com/category/air?Page=2
>>
>> However, I am finding that URLConnection does not download the content that I can see if I save the contents of the browser (Chrome in my case).
>
> http://docs.oracle.com/javase/8/docs/api/java/net/HttpURLConnection.html#setFollowRedirects-boolean-
>
> if (urlConnection instanceof HttpURLConnection) {
> HttpURLConnection httpConnection = (HttpURLConnection) urlConnection;
> httpConnection.setFollowRedirects(true);
> }
Actually this appears the default setting, so the most likely reason
for your observation has been given by Martin Gregorie in another
reply to this thread. The browser additionally fetches related
resources linked from the content you initially get from the URL
given. These related resources may include scripts which the
browser also evaluates, and they may dynamically change the content
you're finally seeing in the browser.
Stuff like cookies maintaining specific session in the browser may
also change the result you're getting.
--
Stanimir
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Q) Why is URLConnection not downloading all the renderable content for me? sandeep6699@yahoo.com - 2016-07-31 09:29 -0700
Re: Q) Why is URLConnection not downloading all the renderable content for me? Stanimir Stamenkov <s7an10@netscape.net> - 2016-08-02 07:50 +0300
Re: Q) Why is URLConnection not downloading all the renderable content for me? Stanimir Stamenkov <s7an10@netscape.net> - 2016-08-02 07:53 +0300
Re: Q) Why is URLConnection not downloading all the renderable content for me? Stanimir Stamenkov <s7an10@netscape.net> - 2016-08-03 09:21 +0300
Re: Q) Why is URLConnection not downloading all the renderable content for me? Roedy Green <inquiry@mindprod.com> - 2016-08-03 18:38 -0700
Re: Q) Why is URLConnection not downloading all the renderable content for me? Martin Gregorie <martin@address-in-sig.invalid> - 2016-08-02 10:19 +0000
csiph-web