I saved an HTML as a static file in order to save it in cache and render it through a service worker when Offline. I would like to make a small change on my HTML in order to get the appropriate encoding. I am using pythonanywhere as my server. And I have defined in my settings.py the following paths:
STATIC_URL = '/static/'
STATIC_ROOT = u'/home/cocoa/cocoa/static'
When I look at my file in the server in the following directory is:
/home/cocoa/cocoa/static/login/Offline/HTML/mEstado.html
My file looks like this:
If I visit the following URL:
https://cocoa.pythonanywhere.com/static/login/Offline/HTML/mEstado.html
My file looks like this:
I allready tried reloading on shift. Unabling the service-worker and
python manage.py collectstatic
But nothing seems to work. I do not know where the problem is, nor how to solve it. Any help would be appreciated.
Did you try to clear you browser cache? Ctrl+F5
. I think problem in cached html file because you run it from static. As I know browser caches all static files from django static folder.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.