NSURLConnection and Javascript

I am trying to access a webpage through an iPhone application. I am trying to connect to NSURLConnection. Perhaps the application is working correctly, but I am redirected to a page that says that I can not continue to work without turning on Javascript. I run it all through the iPhone simulator that comes bundled with xcode. The curious part is that when I go to the same web page with the same safari information in the iPhone simulator, I do not get this reconnection, it sends me to the page I want.

Why does using NSURLConnection give me this redirection if Javascript is enabled in the simulator and you can go to it outside the application? Thanks for any help.

+3
source share
1 answer

NSURLConnection does not interpret javascript. Safari interprets javascript. If you need it to interpret javascript, use a UIWebView and actually display a web page.

Your web page should realize "graceful degradation." It just means your site should work without javascript. You can find a lot of documentation about elegant impairment if you google.

+2
source

Source: https://habr.com/ru/post/1752469/


All Articles