lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Joe Stewart:
> Do you know how dynamic content is handled via http? Is there something
> more than GET/POST/PUT that I need to know about (too impatient to read
> RFCs)? Any pointers?

I've done a little personal research (but are by no means an expert) so if
you have a query I'll tell you what little I know.

Static content content should also respond to the HEAD request (so that the
whole page need not be reloaded if no changes have occured), and should
ideally return a Content-Length so the browser can provide an estimate of
download time. It should also return a Date so that the page may be
effectively cached.

Dynamic content should do the same _if possible_ (obviously very dynamic
data must change its date each time). It may also wish to return a No-Cache
command if the data always changes each access and becomes out of date
quickly, or if the data is sensitive and should not be cached.

With static content the web server does most of that but, with script files,
they should generally be responsible themselves for returning such data.

What do you do if a Lua script never terminates? Do you use debug callbacks
to regain control?

Peter Hill.