summaryrefslogtreecommitdiffhomepage
path: root/libs/lucid-http
AgeCommit message (Collapse)Author
2012-01-09[PATCH] Explicit Cache-Control for lucid.http static contentJo-Philipp Wich
The Chrome web browser revalidates every resource if no explicit Cache-Control or Expires HTTP/1.1 header is sent. This makes the page loads appear to take a long time on pages with a few external resources, adding 300-500ms per item. This includes the XHR json responses that set page images, like wireless signal indicators and the like-- the images are revalidated on every XHR response. As an example, the Network -> Interfaces page generates 16 requests to the lucid http server: Main HTML cascade.css xhr.js tabbg.png cbi.js loading.gif ethernet_disabled.png reload.png reset.gif edit.gif remove.gif add.gif bridge.png vlan.png wifi.png iface_status Of those, 14 should be pulled from cache but they are all valdiated. The lucid server returns the correct 304 (Not Modified) responses but it delays the apparent page load time because of the backlog it creates at the http server. I would suggest setting explicit cache control on all files returned by the lucid http directory dispatcher. The "Expires" header is reportedly more widely supported, however this relies on the clock on the OpenWrt? system being accurate, which may not be the case. The "Cache-Control: max-age=" allows the server to set a timeout in seconds. I've included a patch that sets revalidate interval to 1 year, which is the value recommended by google. Reference: http://code.google.com/speed/page-speed/docs/caching.html Note this could create an issue if there are luci application which are generating files which change that are being served by the lucid http DirectoryPublisher?. I'm not sure if there is anyone doing that. If needed, this can probably be created as an option to the DirectoryPublisher? config stanza for each vhost. Finally, this only affects the Google Chrome browser, as both IE9 and Firefox seem to have their own revalidation interval in the absence of explicit cache control which may be based on the last modified time of the resource. Even in Chrome, this change doesn't take effect until the item is re-served with a 200 HTTP response so Chrome's cache should be cleared after this patch is applied. The patch can be extended to include cache control on 304 responses, but I'd not worry about cluttering the code with it because the problem will solve itself once chrome redownloads the resource.
2009-12-29libs/lucid-http: fix regressions with recent git uciJo-Philipp Wich
2009-11-02Avoid lacking fdsSteven Barth
2009-10-26Be a bit more non-standardSteven Barth
2009-10-26CBI: Cancelaction and event callbacks for DelegatorsSteven Barth
LuCId: Send Keep-Alive headers to avoid browser quirks
2009-07-31Performance improvements, where did that get lost?Steven Barth
2009-07-28Increase timeout for HTTP, fixing some browser problemsSteven Barth
2009-07-27Add native support for homepagesSteven Barth
2009-07-25Allow Basic-Auth pass-throughSteven Barth
2009-07-25Add: luci.http.splice to allow direct copying of data from a fileSteven Barth
descriptor
2009-07-25libs/lucid-http: make chunksinks cope with string-like udataJo-Philipp Wich
2009-07-24Revert "libs/lucid-http: prepare external indexing and tree building in luci ↵Steven Barth
handler" This reverts commit e70104be85933a0d6cef5b8639f3a042e6d76896.
2009-07-23libs/lucid-http: prepare external indexing and tree building in luci handlerJo-Philipp Wich
2009-07-10Move memory limit to lucid, reincrease thread limitSteven Barth
2009-06-16libs/lucid-http: use SERVER_ADDR as fallbackJo-Philipp Wich
2009-06-16Catchall workaround for strange sockaddresses by JowSteven Barth
2009-06-14GSoC: Documentation #2Steven Barth
2009-06-13GSoC: Documentation #1Steven Barth
2009-06-10Revert "libs/lucid-http: copyz() causes a Kernel oops on brcm-2.4, revert to ↵Steven Barth
copy() for now (#70)" Fixed in nixio
2009-06-10libs/lucid-http: copyz() causes a Kernel oops on brcm-2.4, revert to copy() ↵Jo-Philipp Wich
for now (#70)
2009-06-07HTTPd: No keep-alive after POST request, because we do not check stateSteven Barth
of incoming data
2009-06-01Fix query string detectionSteven Barth
2009-06-01lucid: fix separation of query string and url in server handlerJo-Philipp Wich
2009-05-27http/1.1 detectionSteven Barth
2009-05-27HTTP-Timeout to 5 secondsSteven Barth
2009-05-26Fix redirectorSteven Barth
2009-05-25Fix non-HEAD HTTP-ResponsesSteven Barth
2009-05-23GSoC Commit #1: LuCId + HTTP-ServerSteven Barth