0

So I am currently working on an iPad App (iOS 6) that shows a webpage that is located on my company's intranet. The access from the Internet is achieved via a reverse proxy which works great.

The problem is that this webpage is referencing a JavaScript file that is apprently loaded after the webpage is rendered on the client which results in some jQuery scripts not being run on load time. What works is this:

  • open the website through the reverse proxy
  • wait for the webViewDidFinishLoad delegation method to be called
  • then do [webView reload];

After this, the javascript code is successfully executed. However the solution is not pretty and results in extended wait times.

Are there any solutions to ensure that all referenced files are loaded before rendering takes place?

Thank you! Christoph

3 Answers 3

1

You'll have to fix the webpage so that it doesn't try to run the javascript until the file has actually loaded.

Sign up to request clarification or add additional context in comments.

1 Comment

The website is generated from a proprietary tool, there is (sadly) nothing I can do about the output. And doing string manipulation on the html object w/o knowing what to expect from the server does not sound feasible.
0

Look up the UIWebView property that was added in iOS 6 called suppressesIncrementalRendering -- I think that will do exactly what you're looking for.

1 Comment

This looks like it should work but it does not :( the behaviour is not changing at all. If I wait for the website to be completely loaded and then call the reload method, it works. But this is a bad workaround.
0

The problem was the way I had the UIWebViewer interact with the Reverse Proxy. Getting the HTML code through the proxy without involving my webviewer object resulted in a delayed javascript loading. However, after doing one test connection through the reverse proxy authorization class, I could use this method to load all subsequent webpages w/o any problems: [webView loadRequest:request];

Thanks everyone for your ideas and feedback! Christoph

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.