return render(request, "my_template.html", {foo: bar})
Lets say we have a request made in django which renders my_template.html and the context of {foo: bar} now based on the user activity foo and bar change.Now lets say if a user has made his first request now django will return the template and the corresponding {foo: bar} based on user activity.lets say if the user had made a second request with different activity does my_template.html template will be sent from django server to browser or only the changed context is sent to the browser.Does the template gets cached in the browser.
Case 1:
If the template gets cached in browser if a code with some changes is deployed does it reflect in the clients browser.does this work in the way where md5 hash of both the templates is compared if they are not in sync then the template is downloaded from django server
Case2
If The template is rendered every time for every request then does that mean the bandwidth usage is not optimistic.
i read that in node and angular the javascript bundles is cached in clients browser and only data(context {foo:bar}) calls are made to server so the bandwidth usage is better and loading is faster is this true.
as i am new to these frameworks please help me in this as i need to choose the best frame work.
Thanks in advance! :).
from does templates get cached in browser in django
No comments:
Post a Comment