Currently, I am utilizing an ajax call to invoke a php script that waits for 40 seconds using sleep and then generates the output RELOAD
. Subsequently, in JavaScript, the generated output is validated to be RELOAD
, following which the call commences again.
This functionality operates seamlessly on all pages except in Firefox under a specific circumstance.
The issue arises when I execute these calls on a page, then navigate to another page by clicking on a link. Upon returning by using the History (Back) button, the calls initiate; however, Firefox appears to have cached the result and immediately displays RELOAD
. Consequently, these calls load within milliseconds without fetching any updated content. Moreover, there is no server connection being established (even after modifying the php file while the ajax calls persisted).
Hence, it seems that Firefox only utilizes cached output when navigating back via the back button or even using javascript:history.back()
. Conversely, if I load the page conventionally (via a link or entering the URL in the address bar), the calls reach the server correctly and retrieve up-to-date content.
Is there a possible method to override this behavior either through PHP or JavaScript? The implementation involves using jQuery.ajax()
with the "cache:false
" option configured.
I appreciate your assistance!