jQuery mobile page duplication

We decided to use jQuery mobile for a recent project and were very happy with the results until we ran into a weid issue with the ajax loading. It appears that whatever page you come into the site on will hold onto it’s content no matter what. This becomes an issue when you link back to that page. Depending on the situation you may or may not end up with duplicate content getting dynamically injected into the page. Where this gets sticky is that if you are trying to get an element by it’s id you might get he shown content or some sort of hidden cached content. It seems to vary from situation to situation, but we kept having all the javascript in our homepage break. Our solution ended up being to set $.mobile.ajaxEnabled = false; which essentially breaks what we were trying to use the framework for.

Tags: , , ,

Leave a Reply