On Thursday, August 7, 2014 10:50:47 PM UTC+2, mweissen wrote: > > Thanks for the detailed explanation. > > What is the idea? > Let's say there are 30 persons in a lecture. Every person is a user of the > my website. But the pages of the presentation should not be presented all > at once. A new page becomes visible at the moment I give it free. Therefore > every client should ask once a second if there is a new page. But it would > be a lot of traffic if every user gets the actual page once every second. > Therefore I want to control whether a page should reload or not. > > Now I have tried a very simple version of "mytime": > > def mytime(): > jetzt=str(request.now)[:19] > if jetzt[18]!="0": > response.status = 304 > return dict(jetzt=jetzt) > > This function shows every 10 secondes the actual time for 1 second. This > is not the solution I am looking for: the last time value should stay for 9 > seconds - but during these 9 seconds the field is empty. > > I think it is a step in the right direction. > >
Pleaaaase read the RFCs! a 304 should NOT return content. BTW, I think you're missing the point, but if you want to go ahead and play with this madness, at least try to stick to what http 1.1 dictates :P -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.

