Re: Django and Caching Pages
Jonathan, Thanks I'll check them out. On Feb 5, 12:12 pm, [EMAIL PROTECTED] wrote: > boralyl wrote: > > Jonathan, > > > Thanks for your response. I first tested the site in firefox and > > konqueror and had no problems. When using opera though I noticed it > > wasn't requesting the page, as you had mentioned. The browser cache > > was set to check every 5 hours on document requests. I changed it to > > always and now I see the expected results. > > Instead of changing the browser preferences, you might also look at pages > headers sent by your "webserver" from your views. > Take a look at HTTP/1.1 headers : Expires-* headers and Etags too, for > instance. They are here to handle this kind of problems. > > - Jonathan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Django and Caching Pages
boralyl wrote: > Jonathan, > > Thanks for your response. I first tested the site in firefox and > konqueror and had no problems. When using opera though I noticed it > wasn't requesting the page, as you had mentioned. The browser cache > was set to check every 5 hours on document requests. I changed it to > always and now I see the expected results. Instead of changing the browser preferences, you might also look at pages headers sent by your "webserver" from your views. Take a look at HTTP/1.1 headers : Expires-* headers and Etags too, for instance. They are here to handle this kind of problems. - Jonathan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Django and Caching Pages
Jonathan, Thanks for your response. I first tested the site in firefox and konqueror and had no problems. When using opera though I noticed it wasn't requesting the page, as you had mentioned. The browser cache was set to check every 5 hours on document requests. I changed it to always and now I see the expected results. Thanks On Feb 5, 9:58 am, Jonathan Ballet <[EMAIL PROTECTED]> wrote: > boralyl wrote: > > So when I initially visit the page, it doesn't allow me to rate the > > product. So I login and it redirects me to the home page(/). The > > home page prints out my user name, so I know I am logged in. However > > if I visit that product page again it still won't let me rate the > > procduct, unless I refresh the page. After refreshing the page my > > username shows up, and I am allowed to rate the product. > > Isn't your browser that is caching the product page on which you are not > logged ? > > Take a look at the Django's server output, to ensure that your browser is > _really_ requesting the page. > > - Jonathan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Django and Caching Pages
boralyl wrote: > So when I initially visit the page, it doesn't allow me to rate the > product. So I login and it redirects me to the home page(/). The > home page prints out my user name, so I know I am logged in. However > if I visit that product page again it still won't let me rate the > procduct, unless I refresh the page. After refreshing the page my > username shows up, and I am allowed to rate the product. Isn't your browser that is caching the product page on which you are not logged ? Take a look at the Django's server output, to ensure that your browser is _really_ requesting the page. - Jonathan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Django and Caching Pages
I'm working on a django project on a development box. I have for the most part the default settings, and I noticed it seems as though every visited page is cached, and if there isn't a redirect to the "cached" page I don't get updated results. For example If I look at a page that has information pulled from the database but has some features that require login I use {% if user.is_authenticated %} {% else %} {% endif %} So when I initially visit the page, it doesn't allow me to rate the product. So I login and it redirects me to the home page(/). The home page prints out my user name, so I know I am logged in. However if I visit that product page again it still won't let me rate the procduct, unless I refresh the page. After refreshing the page my username shows up, and I am allowed to rate the product. So my question is does django cache all pages by default? It seems that unless there is a redirect somewhere I will not see the updated page w/o manually refreshing. Is there a setting I need to change, and if not, is there something else I should be doing to prevent this caching? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---