How can i do like the Pinterest unique modal process? - url

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

Related

Using history.back() in UIWebView but loaded pre page contains very old data

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.

URL change but not request webview ios

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.

How to update iframe page tab content using a form?

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 :(

FB Like button is transferring wrong UR

I have an iFrame on my website that pops up and will play a video. The iframe source location is:
http://www.fivepointsusa.com/video.php?id=1&v=3_2.flv
The like button WILL pick this link up properly. However its a pretty bland page as it's designed to be inside a specified sized iframe.
The link that i WANT to show is:
http://www.fivepointsusa.com/bio.php?id=1#!prettyPhoto/0/
That link will bring the user to my bio page, open the iFrame and start the video. When I get my script to insert the correct address into the
However when i click the Like button, it drops off the #!prettyPhoto/0/ part. This is the most important part of the link...
How can i get the rest of the URL to show?
You can't. Web browsers are not supposed to transfer the fragment (the part after the '#') when requesting a resource from a server, so that part gets dropped. You can get around this by putting the '!prettyPhoto/0/' part in a URL parameter, e.g. '?id=1&path=prettyPhoto/0/' (make sure to URL encode the parameters).

URL with JQuery Mobile

I am using JQuery mobile in asp.net web form website. I have the following code at the page "pageA.aspx".
View Saved Orders
When I am clicking on this link I am successfully redirected to the PageB, but the URL I am getting is
http://localhost:3244/MyFirstJQueryApp/PageA.aspx#PageB.aspx
But I want URL like this further processing, please help
http://localhost:3244/MyFirstJQueryApp/PageB.aspx
I have done it by setting target="_top" property.
Is this a good practice ?
There are a couple of mods out there (can't find the one I wanted) to remove the hash in the URL, but you have to edit the jQM framework.
You could try using the changePage() http://jquerymobile.com/demos/1.0a4.1/#docs/api/methods.html and set the transition without tracking it in history option to true (I think it's true)
Here is some more documentation on navigation as well: http://jquerymobile.com/demos/1.0a4.1/#docs/pages/docs-navmodel.html
mightbe able to think of another way
The idea behind jQuery Mobile is that you don't do it the way you're trying to do it! Check Dynamic pages with jQuery Mobile, which shows you how to let jQm do the work in the background by loading new data into the DOM.

Resources