Forums Register Login

how to pass browser type while using URLConnection.

+Pie Number of slices to send: Send
I am tring to access a web page. However, this page is having a javascript which checks for browser type whethere it is IE or netscape and if it is neither of these two it will redirect to a different page. Since I am tring to access for a regular java program, I can only read the redirected page. My problem is how to set that the I am accessing throgh IE.
+Pie Number of slices to send: Send
Try using setRequestProperty to create headers. Each name & value pair you set turns into one header. You might like to have an HTTP sniffer like Fiddler around to observe the headers going back & forth in normal conversations. That will make it easier to build your own headers to impersonate a regular browser.

Fiddler
+Pie Number of slices to send: Send
So, any luck with that? Or with changing your name?
if you think brussel sprouts are yummy, you should try any other food. And this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 695 times.
Similar Threads
problem with proxy server
Cant able to get focus at perticular textfield in javascript
display rtf in browser
excel page not opening in a browser
Getting Multiple Values from a Select Tag
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 06:46:53.