On Tuesday 07 December 2004 12:34, [EMAIL PROTECTED] wrote: > On Tue, December 7, 2004 10:31 am, Derek Broughton said: > > If you're going to do something that makes it worthwhile putting the JS > > in the > > frame, you probably should be using a script file - in which case it is > > cached anyway and you get the same savings. > > What is caching it? The browser? In that case you can't rely on it.
No, but it's not your problem if people turn off their cache. Few enough do that I'm not concerned about it being a performance problem on my server. > Also, if you use a script file, you lose all notion of state. This I think > is a bit of a blurry line between data and code, Not really. 'code' goes in the script file. 'state' data would still be in the uncached page. I'm firmly in favor of: > (c) have > some code that sets the menu states according to the application state on > each page. > But, this is information that really > only has to do with the UI, information that you really shouldn't have to > deal with every page, so why not have this functionality and state > information in a hidden frame? I actually agree with all this. I usually use frames. I just didn't agree that you would necessarily get a performance improvement by putting your functions in a frame (and think that any functions that are going to be used throughout an application belong in one or more script files, anyway, regardless of whether they're in the frame that invokes them or in another). -- derek --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]