Results 1 to 2 of 2
Thread: UrlConnection question(s)
- 08-31-2011, 07:55 AM #1
Member
- Join Date
- Jul 2011
- Posts
- 15
- Rep Power
- 0
UrlConnection question(s)
Hello,
I have two questions about urlconnection.
First, when trying to connect to a site that also has a mobile version, the site keeps responding with the mobile version. How can I make it take me to the normal site? I asked this question before, and someone told me to try setting the user agent. I set the user agent and it did not make a difference.
Second, when trying to connect to a page that runs javascript, it keeps redirecting me to the <noscript> version. Is there a way to enable the urlconnection to allow javascript/not block javascript?
Thanks!
- 08-31-2011, 09:56 AM #2
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
If you have to specifically define what the URL is, then how it pick the mobile version? Can you show me how did you open the connection.
Regarding your second question, UrlConnection doesn't do anything with the scripts. Actually it can't. UrlConnection just gets the content and it doesn't try to parse it and do anything with JS/HTML/CSS and so on.
Similar Threads
-
Lock between URLConnection and System.in
By mab in forum NetworkingReplies: 1Last Post: 02-24-2011, 12:21 PM -
URLConnection Efficiency
By Lil_Aziz1 in forum New To JavaReplies: 22Last Post: 08-19-2010, 06:27 PM -
URLConnection not timing out as expected
By StephenS in forum NetworkingReplies: 2Last Post: 04-02-2010, 03:10 AM -
How to set request parameters to an URLConnection
By somesh A in forum NetworkingReplies: 0Last Post: 04-10-2009, 08:08 AM -
Opening URLConnection
By Java Tip in forum Java TipReplies: 0Last Post: 11-24-2007, 07:37 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks