On Nov 22, 2010, at 4:57 PM, Bruno Rocha wrote: > I am hosting a website in a shared webfaction plan, I need to load some > images, so I made all adjusts I found in webfaction user fórum to make apache > to server the images directly not overprocessing web2py static function. > > I made changes to routes, I made Symbolic Links to Static, I made apache > config (mod_alias) that webfaction user forum indicates. > > But I think It is not working, I am still getting a little delay when serving > the images, after the page load you can see a "bar" rastering the image look: > http://natalanimal.com.br (reloads the page ans see the bar on every image) > > Someone else knows how to configure images to be served better in webfaction > shared plan? >
Keep in mind that routes.py doesn't enter the picture for anything being served directly by the host server (I see you're using nginx). Aside from figuring out how to serve the images directly, I see a couple of other problems. Here's the header from one of the dogs: HTTP/1.1 200 OK Server: nginx Date: Tue, 23 Nov 2010 01:13:44 GMT Content-Type: image/jpeg Connection: keep-alive Set-Cookie: session_id_init=174-144-113-160-a877555e-5e01-4be1-ab2e-21a592878bb9; Path=/ Expires: Tue, 23 Nov 2010 01:13:44 GMT Pragma: no-cache Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Content-Length: 38773 Notice the no-cache pragma: that doesn't make any sense, unless you're setting no-cache just for debugging. Also, the image for Gabby (this is the headers we're looking at) is served as 480x393, and 38KB. But you're displaying it as 160x122. So you're sending 10 times as many pixels as you're going to display. You really want to shrink your images on the server, and not at the browser. (Also, fwiw, your width shrink isn't proportional here, which is a minor problem.)

