{"comment":{"created_at":"2011-10-10T16:38:44Z","body":"I have a fix for this that I'm running against the unit tests. I'll check in once the results return all green/passing.\r\n\r\nAs a side note, I'm a bit hesitant about forcing all hash Urls with:\r\n\r\n    http://site.com/#root\r\n\r\ninto:\r\n\r\n    http://site.com/\r\n\r\nMainly because I'm not sure of the intent of the developer in all cases. That said, it's easy to work around thr problem if you really want that case to always result in a clean URL:\r\n\r\n\t$( document ).bind( \"pagebeforechange\", function( e, data ) {\r\n\t\tvar toPage = data.toPage;\r\n\t\tif ( typeof toPage === \"object\" && !data.options.dataUrl ) {\r\n\t\t\tif ( toPage[ 0 ] === $.mobile.firstPage[ 0 ] ) {\r\n\t\t\t\tdata.options.dataUrl = $.mobile.getDocumentUrl();\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\r\nThe code snippet above makes use of the dataUrl option to changePage() which is a mechanism that can be used to tell the framework what to actually use when setting the location. In the case above we're saying, if we're actually going to go to the first page, always make sure you use the original documentUrl.","updated_at":"2011-10-10T16:38:44Z","url":"https://api.github.com/repos/jquery/jquery-mobile/issues/comments/2349317","id":2349317,"user":{"avatar_url":"https://secure.gravatar.com/avatar/fa72320f7fd01aa7d743768f85ccf9ea?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/jblas","id":394996,"login":"jblas"}},"action":"created","issue":{"number":2644,"created_at":"2011-10-07T18:04:18Z","pull_request":{"diff_url":null,"patch_url":null,"html_url":null},"body":"Scenario:\r\nI navigate to site.com/ then click a link to site.com/page. Then try to return home by clicking on a link site.com/. But I get site.com/page#root\r\n\r\nThe link is:\r\n```html\r\n<li ><a href=\"/\" data-icon=\"home\" data-theme=\"c\" ><p  class=\"ui-li-heading\" >Home</p></a></li>\r\n```\r\n\r\nComments from IRC:\r\nIf you remove the id off of your first-page you will get the result you are expecting.\r\n\r\nResult:\r\nRemoving the ID of the root page did fix the URL. However the javascript and page* events that target this page no longer work because the page has no ID.\r\n","comments":7,"title":"Navigating to root \"/\" does not generate clean URL if root page has id=\"*\"","updated_at":"2011-10-10T16:38:44Z","url":"https://api.github.com/repos/jquery/jquery-mobile/issues/2644","id":1846269,"assignee":{"avatar_url":"https://secure.gravatar.com/avatar/fa72320f7fd01aa7d743768f85ccf9ea?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/jblas","id":394996,"login":"jblas"},"milestone":{"number":9,"created_at":"2011-09-27T18:19:16Z","due_on":null,"title":"1.0RC2","creator":{"avatar_url":"https://secure.gravatar.com/avatar/4ec3e17536d217f2367be3aebb72a72b?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/toddparker","id":359929,"login":"toddparker"},"url":"https://api.github.com/repos/jquery/jquery-mobile/milestones/9","open_issues":28,"closed_issues":17,"description":"","state":"open"},"closed_at":null,"user":{"avatar_url":"https://secure.gravatar.com/avatar/2d4fe2e2847bb4f70a5c6f21598c1537?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/ahutch","id":747048,"login":"ahutch"},"html_url":"https://github.com/jquery/jquery-mobile/issues/2644","labels":[{"name":"4 - High","url":"https://api.github.com/repos/jquery/jquery-mobile/labels/4+-+High","color":"ff7519"}],"state":"open"},"legacy":{"issue_id":1846269,"comment_id":2349317}}