I don't often write about code - I am no coder - but I struggled with something for the best part of a day and I thought I would post this just in case someone at some point might find it useful.
I stumbled across jQuery after finding YUI just a little to big for me to get my mind around and I am glad I did because it seems simple enough for me to grasp. Anyway, I was using .load to call a SUB PAGE into a MAIN PAGE using AJAX. My set of routines that something like this
- MAIN PAGE calls SUB PAGE via .load. SUB PAGE has table for data entry and hyperlinks for kicking off SQL PAGE to execute relevant sql
- Following data entry into SUB PAGE (via MAIN PAGE), click on hyperlink updates database using SQL PAGE and then refreshes MAIN PAGE div that contains SUB PAGE
Well ... for hours I kept inputting data, then clicking the relevant links only to find that the MAIN PAGE div sometimes refreshed, sometimes didn't. F5 always worked though. So I was pretty sure I had a cache problem. So I stopped using .load and started using .ajax, using the 'cache: false'. I could see that .ajax was now suitably randomising the get url, yet still my MAIN PAGE div was not refreshing. I was certain I had a caching problem ...
But I did not.





