• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSURLConnection and JavaScript
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSURLConnection and JavaScript


  • Subject: Re: NSURLConnection and JavaScript
  • From: Andrew Farmer <email@hidden>
  • Date: Thu, 28 Aug 2008 02:24:19 -0700

On 28 Aug 08, at 01:38, dexter morgan wrote:
I'm using NSURLConnection to download a web page. Unfortunatly some
particular pages detects JavaScript compatibility so the result data
is something like "you cannot see this page because you have not js
enabled".
Is there any way to workaround this "problem"?

Two possibilities:

1. The page you are downloading really does say that (in a <noscript> tag, perhaps), so you'll need to either run the script or emulate it to get the content you're looking for.

2. The server is doing user-agent sniffing and sending this message to clients which have an agent that it doesn't recognize. (This is evil.) You can construct a NSMutableURLRequest with a custom user-agent header to counter this.
_______________________________________________


Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >NSURLConnection and JavaScript (From: "dexter morgan" <email@hidden>)

  • Prev by Date: Re: Design Question: Bindings & Custom Views
  • Next by Date: Re: Design Question: Bindings & Custom Views
  • Previous by thread: NSURLConnection and JavaScript
  • Next by thread: [MEET] Aachen CocoaHeads TODAY (August 28, 2008)
  • Index(es):
    • Date
    • Thread