I am building an application with jquery, php, jquerymobile on a WAMP server. Everything in the app works fine until I try to go back to another page and where it should fire a function based on the pageinit
function. It doesn't seem to fire therefore the page is blank and no json data is put into the page. When I checked the events with firebug I realised in the console that the page gets a 304 Not Modified error which I read has to do with cacheing. How can I stop this from happening also within my ajax request the cache value is set to false.
Asked
Active
Viewed 847 times
0

Kern Elliott
- 1,659
- 5
- 41
- 65
-
304 is not an error, it's a signal saying "use cache if available" – Emery King Mar 20 '13 at 02:39
-
@MarshallHouse ok well it works like an error for me as the cache doesn't record the ajax information but just the plain page. So how can i disable this cacheing – Kern Elliott Mar 20 '13 at 09:03
-
Any update on this how can this be solved – Kern Elliott Mar 20 '13 at 20:01
-
show the code. we need to know what we are looking at. – Emery King Mar 21 '13 at 03:55
-
I will create a new issue because I solved this problem by using the `$.ajaxSetup ({cache: false});` all files are now fireing on the 200 however when I go back the code is not longer fireing so in the new issue I will have all the code and what I am trying to achieve. – Kern Elliott Mar 21 '13 at 10:20
-
I have this problem, but in my case I do not want to disable caching. The main problem is that jQuery does not seem to bind the events when a 304 is returned by the server after visiting a page, thus all bindings on the page are broken (button clicks, etc). – Eneko Alonso Jan 19 '14 at 16:15