3

I am building an iPhone optimized website and when people use the '+' button on the iPhone you can add a bookmark to the website on the homescreen of the iPhone. How can I specify a url that will be used instead of the page they are on.

For example, if they are in the /Foo/Bar url I want the bookmark to be /Home so they go automatic to the home url and not go from their homescreen button straight deep in the site.

Is there some way to achieve this, in stead of making the whole website ajax based so there is only 1 url.

ThinkingStiff
  • 64,767
  • 30
  • 146
  • 239
Peter Kiers
  • 602
  • 4
  • 16
  • Unless this is a web app where I guess its reasonable to control their access point, why would you want to do this? People use bookmarks to bookmark the parts of the site they are interested in as much as the site as a whole. – Jake Jul 11 '10 at 09:41
  • It is a web application, so not all urls are possible every day. It has like sort of flows for entering data. So if they get on the site they have to start from an access point / home page. – Peter Kiers Jul 11 '10 at 09:49

1 Answers1

0

You can update the window.history record on page load for any page that you want saved (which may be all your pages).

window.history.replaceState( '', '', '/Home' );
ThinkingStiff
  • 64,767
  • 30
  • 146
  • 239