On Mon, 20 Oct 2003 14:44:50 -0400 "Joshua Minnie" <[EMAIL PROTECTED]> wrote:
> Does anybody know how I can make force a javascript file (written in > PHP) to be cached if the user agent allows it? > > Here is the situation: > I am creating a dropdown menu system that contains a customer list, > loaded from a database. This list is written to the javascript file > for the menu. The menu can be quite large as the data grows. What I > would like to do, is force it to be cached (unless of course the > user agent doesn't allow it) so that it doesn't have to make the > call to generate the file each time. What is the second "it" in the last sentence above? A browser wouldn't make the call to "generate" the javascript file each time. > I have searched through the php.net website and even through the > HTTP/1.1 protocols. I am continuing to look, but have not found a > definite answer as to whether or not what I am trying to do is > possible. Just make sure that the javascript is on a separate file (i.e. whatever.js) and that it's NOT being generated by your (php) script each time. Then, "call" that file from inside your html/php page. - E - __________________________________________________ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php