I’m working on a rather extensive mobile site using JQM (1.1.0). The structure is built to make ajax-fetching as smooth as possible. Until now I’ve included the header (html-tag, header-tag and all imports of scripts) on every single file / page.
Struggling with some caching issues and events not firing I stumbled across this post (#1),
saying that the header only should be included once in the first document / file that will be loaded. This works great and also solved many of the caching issues I previously had.
However this has also created a quite nasty problem: If the user hits refresh it breaks the site completely – as the necessary document tags are missing from all but the first page.
So, is there any way to handle this gracefully or should I revert and go back to the JQM Doc way of including the header in all pages? I would feel more comfortable with the latter, but the author of the above post has a good point – at least in my opinion.
Or to rephrase, does JQM truly ignore the header on fetching pages?
Not a complete answer, but the solution I finally went for was a single, global header.
It turns about JQM does indeed ignore the header. This still left the refresh problem, but this was solved with a simple javascript redirect back to the splash screen that contained the full header.