Can't load file:// pages #1578

jblas opened this Issue May 6, 2011 · 12 comments


None yet

1 participant


When a JQM document is loaded via file:// protocol, links to local files fail to load.

This issue was reported initially as a PhoneGap problem by @plethllc in Issue 991, but it seems that *ANY * non-Mozilla browser also exhibits the problem even on the desktop.

Something changed recently because this used to work.

@jblas jblas was assigned May 6, 2011

I just checked in a fix for the file:// problem:



I just verified that this fixes things on desktop and in phonegap.

@jblas jblas closed this May 6, 2011

I just pulled the update down, did a new make, and i'm still seeing the same infinite spinner. This thing is killing me.


What do you mean "pulled the update"?


I did a pull from github on my checkout of jqm, got the commit you made, and did a make to rebuild the jqm js file.

Am I using a term incorrectly? (I'm not all that experienced with git lingo)


The JQM js file in xcode now shows this section of code, which is your change right?

//set the generated BASE element's href attribute to a new page's base path
reset: function() {
base.element.attr( "href", initialPath );


I stuck my example in a public repo if it would help to see any of it.



I just tested phonegap in the Mac iPhone emulator and it works just fine.

Can you test by using remote URLs? I'm using the following in my packaged app:

<link rel="stylesheet"  href="" />
<script type="text/javascript" src=""></script>
<script type="text/javascript" src=""></script>
  • Kin


Just tested, still getting the spinner.

See the repo I made above, but basically, two pages. (the comment thing with github seems to be eating part of the div on the second page example, but you can look at the repo if it isn't clear)


<div data-role="page" data-theme="b" id="jqm-home"> 
    <div  data-role="header"  data-theme="a"> 
        <h1>Page Title</h1> 

    <div data-role="content"> 
        <img src="tux.png" />
        <ul data-role="listview" data-inset="true" data-theme="c" data-dividertheme="b"> 
            <li data-role="list-divider">Search By</li> 
            <li><a href="#jqm-search">Username</a></li> 
            <li><a href="user.html">Email Address</a></li> 

and user.html


So the problem seems to be the data-ajax="false" on your form in the page you are trying to load. I'm not exactly sure why that would affect the page currently loading, but I'm looking into it.

If you remove that attribute temporarily, you will see that the page switches just fine.


I can confirm this, although I don't understand it.



I just filed issue 1580:


Please move any follow up discussions there. The original issue reported in 1578 is fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment