On 10 Apr 2013, at 12:34 PM, Anthony <abasta...@gmail.com> wrote:
> In your homepage you are serving 10 images, at least, in fast_download 
> controller, here it's safe
> to put session.forget() if not already. It will allow concurrent request from 
> the same browser.
> 
> Good point. If those images are being served dynamically from a controller 
> because they were uploaded (as opposed to being static assets), then the 
> session file locking will cause each request to be handled serially (only a 
> problem if using file based sessions -- no locking for db or cookie based 
> sessions). In that case, you can add session.forget(response) to the download 
> function (be sure to pass in "response", otherwise, it won't actually unlock 
> the file and will be no help). This is not necessary with static files, as 
> they are served before the session is connected or the app code is executed.
> 

Also (with dynamically served images), if the images are cacheable by the 
browser, you probably need to set the appropriate cache headers on the response.

-- 

--- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to