I'm working on an Angular.js page and making changes to an html 'partial'. Refreshing the page causes Firefox to correctly re-request the main html page from the server, but subsequent 'partial' templates that are rendered client-side are never re-requested and instead grabbed from the BFCache, so changes to those files aren't detected.
Screenshot from Firebug:
I can confirm via the development server (Django) that those partials are never requested.
I've tried every kind of refresh, including the Reload Plus extension.
These are less than ideal, but two options appear to address the problem.
One is the Clear Cache addon, which can be configured to clear disk and memory cache and reload the current tab. I'm not sure if this clears the cache completely or just for the current tab's domain, but it's probably the entire cache.
The other is to disable the browser cache in firebug:
I'm not sure if this simply disables the cache for the current page, current domain, or everywhere.
It'd still be nice to have a 'Reload this page and everything referenced by this page' option.
I would just set a flag in your templates to add a simple onunload function like this:
{% if CLEARBFCACHE %} <body onunload="myFunction()"> {% endif %}
Then set CLEARBFCACHE = 1 (in settings.py) when in development.
If you need to test for production set CLEARBFCACHE = 0 then deploy to your staging server or (if you don't have a separate server) I believe you can change the url from 127.0.0.1 to locahost to make Firefox think it's a different site.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With