From a589da39365c3d85f8e6451794783264a96783f8 Mon Sep 17 00:00:00 2001 From: John Bender Date: Fri, 7 Oct 2011 17:11:30 -0700 Subject: [PATCH] added 'known issues' bullet for (push|replace)State --- docs/pages/page-navmodel.html | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/pages/page-navmodel.html b/docs/pages/page-navmodel.html index 15ffacb6..919a02e6 100644 --- a/docs/pages/page-navmodel.html +++ b/docs/pages/page-navmodel.html @@ -111,6 +111,7 @@
  • Any unique assets referenced by pages in a jQuery Mobile-driven site should be placed inside the "page" element (the element with a data-role attribute of "page"). For example, links to styles and scripts that are specific to a particular page can be referenced inside that div. However, a better approach is to use jQuery Mobile's page events to trigger specific scripting when certain pages load. Note: you can return a page from the server with a data-url already specified in the markup, and jQuery Mobile will use that for the hash update. This allows you to ensure directory paths resolve with a trailing slash and will therefore be used in the base url path for future requests.

  • Conversely, any non-unique assets (those used site-wide) should be referenced in the <head> section of an HTML document, or at the very least, outside of the "page" element, to prevent running scripts more than once.

  • The "ui-page" key name used in sub-hash url references can be set to any value you'd like, so as to blend into your URL structure. This value is stored in jQuery.mobile.subPageUrlKey.

  • +
  • When traveling back to a previously loaded jQuery Mobile document from an external or internal document with the push state plugin enabled, some browsers load and trigger the popstate event on the wrong document or for the wrong reasons (two edge cases recorded so far). If you are regularly linking to external documents and find the application behaving eratically try disabling pushstate support.