views:

201

answers:

2

Hi all,

I have a URL e.g. http://www.test.com that contains a meta redirect as follows:

However, - (void)connectionDidFinishLoading:(NSURLConnection *)connection just returns the initial data from the first URL.

Is it now my responsibility to parse the returned HTML file and pull out the meta url attribute and call NSURLConnection again? Or is there a better way?

How secure is this approach?

It would probably be better to just use an alternative redirection method, but for now, this is the only one open to me...

A: 

It would be better to use an alternative redirect, perhaps javascript or header redirects?

Jasarien
+1  A: 

If the refresh is in the HTML and you don't intend to let a UIWebView display it, it most certainly is your responsibility to parse the HTML and act on it (if you want to handle the redirect that is).

A simpler place to put the redirect is in the HTTP response -- that requires a bit more server access but most hosting places will let you do that.

Epsilon Prime