A few comments/notes/questions for the discussion ... I've been experimenting with finding an optimal way to serve our Javascript, CSS and Image files. I like the idea of placing them in the "web_decoy" folder to bypass "On Web Connection". A few quick tests showed that serving a 1.8 MB jpg from the "web_decoy" folder took about half as long as passing it through "On Web Connection". Cool.
What we're currently doing is serving JS files from the standard "web" folder. The "A4D_PostExecuteHook" checks to see whether the file being served is JS. If so, it appends "Cache-Control: max-age=313935307" and "Expires: Mon 02 May 2017 06:00:00 GMT" headers - far-future headers, according to Yahoo! terminology :-). The benefit of this is that the browser doesn't need to make a request to the server to see whether a more recent file is available. It simply uses whatever is has kicking around in the cache. So, as long as you're not changing your JS files much, you're all set. We use a versioning scheme, so when we roll out website updates, we include the newest version number in the path to the JS files. That way, the browser is forced to download a fresh copy when changes are made. Compared to using "web_decoy", this scheme has a longer initial download time for scripts, but fewer subsequent server requests. Using "web_decoy" seems to have a shorter initial download time, but more server requests. I always feel like a blind man when I'm poking around with caching implementations, so if anyone notices some egregious errors with the above, please let me know! Also, the YSlow extension for Firebug is great, if you don't have it: http://developer.yahoo.com/yslow/ Thanks! - Clayton _______________________________________________ Active4D-dev mailing list [email protected] http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/
