I am using WebView and goBack is implemented with custom back button . When I navigate more than one request deep in the web view, when trying to hit back, I will flip-flop between the last request and current, instead of backing all the way back to the initial page (Home page).
My Questions
1) Where does web view history stored,
2) Am I able to see the url array list when i navigate more than one request,
3) May I know location of web view history stored in application sandbox.
Thanks.
Check it out sample: https://github.com/samvermette/SVWebViewController
It is a drop-in inline browser for your iOS app.
Hope, It will helpful to you, Sir
:)
Related
IOS 8.0+
My app use UIWebview to visit a forum site.
The forum front page contains two tag: default one is 'Recommend', another one is 'Newest'. Using ajax to load post data When user switch to 'Newest' tag, at the same time the page runs the follow codes to save state:
window.history.pushState(null, title, url);
After that if user is interesting with some post, he/she would click link and jump to a new page to view detail of the post. In this page, I use follow code to let user have a way to go back to 'Newest':
history.back(-1);
Now interesting thing happened, go back to 'Newest' tag but post data is old.
After some tests, I found the data is always be the first time loaded after installed the app. This bug will not happen in Safari or Android app.
I believe it should have some relationship with webView cache.But why UIWebview does't use new cache? And how to
solve this problem?
Oh no...nobody meet this problem?
My current solution is:
use js code to auto refresh the page when go back.
everyone.
I am building an hybric app that using web and Xcode. First time, I use a webview to open web app in which it contains a menu (on main screen). I use shouldStartLoadWithRequest to get request URL before it request. Then when user touch a button on that menu, I see that URL changes but shouldStartLoadWithRequest method not get called, I need to get URL in that method before it requests to know where it will navigate. Can anyone explain for me? I have no knowledge about web. Thank you very much.
As I understand it, the function shouldStartLoadWithRequest gets called only for urls which is going to load content or, load new webview frame.
There are few kind of urls which might be assigned to javascript that doesn't actually load a page, may not work. Do you need to intercept it before the link navigation occurs.
Also it would help provide better answers if you gave details of the action (<a href="..."> or javascript) that the manu link will perform.
I can not figure out what is the problem but the following is my trick:
I detect that the URL changes but it does not request data. I use UITapGestureRecognize to detect when user taps to webview and perform an action after delay 0.01s to get URL. At this time, URL change to new URL of new page. After get URL I implement corresponding to that URL.
I am building an app using Backbone.js and jQuery Mobile. On some pages in my app I have external href links and I'm running into an issue.
When a user clicks and external href link, get taken to the external site and then hits the back button. My app does not load from the proper page where the user originally left the app from.
In fact my entire DOM is reset so it looks like my site gets a complete refresh and doesn't keep any of its former state.
I have been trying to search for a solution but this issue is kind of hard to word out. I hope it makes sense.
Does anyone have any suggestions?
UPDATE
Stupid error on my part.. I had a bad id set on the page and it didn't load the data I had saved in the session for it when a user returns to the page.. Changed the id and all is well. Thanks!
Link
Make you external links open up new tabs.
If you have used one html with multiple pages solution then there's an explanation for this.
rel="external" will cause a full page refresh so last page location will not be remebered. When you return to the last location it will trigger new refresh and the first page will be shown again.
This can be prevented with a multiple html page solution.
I am trying to pass data using a form to a Facebook iFrame page tab but can't seem to figure how to do it.
I have a page tab on my Facebook page with several elements such as links and images directing users to various pages on the main website. This is updated every week, so rather than update the HTML file and upload via FTP everyweek i would like to see if i can create a form to pass the new data to the iframe.
In addition the Facebook page tab cannot be created in PHP as the server is running ASP.NET
I am trying to do this without the use of a database table if possible, using POST or GET would be preferable.
If anyone knows of any tutorials or has any tips i would be very grateful.
Cheers
You can only pass content or interact with iframe content if it's on the same domain as the parent webpage that has the iframe. All browsers have a "same origin policy" that prevent you from being able to do that - sorry :(
I have a question that
Point> I don't want to know generally function of modal, but like Pinterest
Question core > 1. Can i change the URL when i use ajax without "reloading"
Work flow >
1) On Pinterest, i click on a image
2) A modal window opens up, but the URL of the page also changes without "reloading"
even though it use ajax
I've known that when i using a modal function, it dosen't change the URL on the page,
but not on Pinterest
URL change e.x) rootURL -> otherURL
3) I click the background of the modal, the URL of the page also changes without "reloading"
and modal windows closed
URL change e.x) otherURL -> rootURL
So, If you have some solution or information, please let me know that.
Also I have red related question answers, but it's not enough. and don't want to get information obout HTML5 API cause i'm not going to provide HTML5 service
How can I duplicate Pinterest website's modal effect?
Pinterest like ajax loading
Changing the Url without a HTML call
Manage in the same url the Full HTML document and a JSON object (or a partial HTML response)
you can do like this http://mazzimo-in-london-eng.blogspot.com/2013/01/the-pinterest-url-sorcery-how-pinterest.html