Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7657257
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T12:58:53+00:00 2026-05-31T12:58:53+00:00

Depending upon the url, sometimes multiple urls can be loaded, for example suppose you

  • 0

Depending upon the url, sometimes multiple urls can be loaded, for example suppose you load the url http://www.zagat.com/ into UIWebView then shouldStartLoadWithRequest: will get called numerous times with the urls as follows:

http://www.zagat.com/ 
http://pixel.fetchback.com/serve/fb/pdj?cat=&name=landing&sid=3997 
https://m.google.com/app/plus/poswidget/?hl=en-US&jsh=m%3B%2F_%2Fapps-static%2F_%2Fjs%2Fgapi%2F__features__%2Frt%3Dj%2Fver%3Dt_fRXLZrGUk.en_US.%2Fsv%3D1%2Fam%3D!wJ3zzZyr7MyIPjLesA%2Fd%3D1#url=http%3A%2F%2Fwww.zagat.com%2F&size=small&count=true&id=I1_1331701330274&parent=http%3A%2F%2Fwww.zagat.com&rpctoken=375018132&_methods=onPlusOne%2C_ready%2C_close%2C_open%2C_resizeMe%2C_renderstart 

http://pixel.fetchback.com/serve/fb/blank 
https://www.googleapis.com/static/proxy.html?jsh=m%3B%2F_%2Fapps-static%2F_%2Fjs%2Fgapi%2F__features__%2Frt%3Dj%2Fver%3Dt_fRXLZrGUk.en_US.%2Fsv%3D1%2Fam%3D!wJ3zzZyr7MyIPjLesA%2Fd%3D1#parent=https%3A%2F%2Fm.google.com&rpctoken=809526044 
https://m.google.com/app/plus/poswidget/?hl=en-US&jsh=m%3B%2F_%2Fapps-static%2F_%2Fjs%2Fgapi%2F__features__%2Frt%3Dj%2Fver%3Dt_fRXLZrGUk.en_US.%2Fsv%3D1%2Fam%3D!wJ3zzZyr7MyIPjLesA%2Fd%3D1&jsh=m%3B%2F_%2Fapps-static%2F_%2Fjs%2Fgapi%2F__features__%2Frt%3Dj%2Fver%3Dt_fRXLZrGUk.en_US.%2Fsv%3D1%2Fam%3D!wJ3zzZyr7MyIPjLesA%2Fd%3D1#bub=1&url=http://www.zagat.com/&id=I2_1331701333045&parent=http%3A%2F%2Fwww.zagat.com&rpctoken=257947967&_methods=_onopen%2C_ready%2C_onclose%2C_close%2C_open%2C_resizeMe%2C_renderstart

(obtained by adding a NSLog to shouldShartLoadWithRequest)

As loading a single url can lead to multiple urls being loaded by UIWebView how is it possible to know when the page you originally loaded actually has fully finished loaded?

I tried injecting the following javascript into the page:

var script = document.createElement('script');  
script.type = 'text/javascript';  
script.text = window.onload = function DOMHasLoaded() {
document.location.href = "mydomain://anything.stuff";
};

But when executed the order of urls passed to shouldStartLoadWithRequest is:

http://www.zagat.com/ 
http://pixel.fetchback.com/serve/fb/pdj?cat=&name=landing&sid=3997 
http://pixel.fetchback.com/serve/fb/blank 
https://m.google.com/app/plus/poswidget/?hl=en-US&jsh=m%3B%2F_%2Fapps-static%2F_%2Fjs%2Fgapi%2F__features__%2Frt%3Dj%2Fver%3Dt_fRXLZrGUk.en_US.%2Fsv%3D1%2Fam%3D!wJ3zzZyr7MyIPjLesA%2Fd%3D1#url=http%3A%2F%2Fwww.zagat.com%2F&size=small&count=true&id=I1_1331701452309&parent=http%3A%2F%2Fwww.zagat.com&rpctoken=248478838&_methods=onPlusOne%2C_ready%2C_close%2C_open%2C_resizeMe%2C_renderstart 
https://www.googleapis.com/static/proxy.html?jsh=m%3B%2F_%2Fapps-static%2F_%2Fjs%2Fgapi%2F__features__%2Frt%3Dj%2Fver%3Dt_fRXLZrGUk.en_US.%2Fsv%3D1%2Fam%3D!wJ3zzZyr7MyIPjLesA%2Fd%3D1#parent=https%3A%2F%2Fm.google.com&rpctoken=230813838 
mydomain://anything.stuff 
https://m.google.com/app/plus/poswidget/?hl=en-US&jsh=m%3B%2F_%2Fapps-static%2F_%2Fjs%2Fgapi%2F__features__%2Frt%3Dj%2Fver%3Dt_fRXLZrGUk.en_US.%2Fsv%3D1%2Fam%3D!wJ3zzZyr7MyIPjLesA%2Fd%3D1&jsh=m%3B%2F_%2Fapps-static%2F_%2Fjs%2Fgapi%2F__features__%2Frt%3Dj%2Fver%3Dt_fRXLZrGUk.en_US.%2Fsv%3D1%2Fam%3D!wJ3zzZyr7MyIPjLesA%2Fd%3D1#bub=1&url=http://www.zagat.com/&id=I2_1331701453238&parent=http%3A%2F%2Fwww

i.e. mydomain://anything.stuff gets passed to shouldStartLoadWithRequest as a result of the document.location.href change but it doesn’t get passed as the final url.

So therefore how is it possible to know when the page has finally finished loading in full and there will be no more urls processed?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T12:59:06+00:00Added an answer on May 31, 2026 at 12:59 pm

    Only one suggestion i have – to use some connectivity class to get the data and display it at your web view. The benefit is that you are in full control of the connection, for example you can track the response codes 3xx and be aware that redirection happened. Unfortunately that cuts off the easy support of some documents (like MS Office files), and there’s much extra work you probably don’t work to do. As a shortcut, you could try to use a ready GDataHTTPFetcher which has redirects support declared.

    Basically as i understand HTTP redirection the status code 200 of the response means you are in the end of the redirection route, but there’s no other way i know to get the response status code.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my application,I need to load different .xib in different tableView cells depending upon
I am trying to display rows depending upon users choice. Suppose (s)he wants only
I would like to handle requests differently depending upon the MIME type. For example,
In my project CSS files can be pre-processed and then optionally minified (depending upon
Depending on my task in Vim I have several tabs open. How can I
Depending on the font settings (DPI and such) on the user's computers, I can
I have an AJAX call which loads an Dialog page, now depending upon the
I have a loop in xsl and depending upon the attribute value, i want
In my aplication, I want a tableview with different cell structure depending upon the
Below, the result1 and result2 variable values are reporting different values depending upon whether

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.