i've been looking at the LOAD_FLAGS associated with 
nsIWebNavigation::LoadURI(...) and they are a mess!!

Currently, they are modeled after the 'LoadType' enumeration defined in 
nsDocShell.h...  this means that they are tightly tied to the current 
functionality of the DocShell - rather than controlling functionality in 
a generic manner...

Below is a list of the flags that I think should be specified...  The 
flags are broken into funtional catagories (general, cache, session 
history)....

  general flags:
  -------------
  + bypass URI fixup on string (assume string is already a wellformed URI)
  + bypass proxy server.

  caching flags:
  -------------
  + do not cache (content is not cached)
  + bypass cache (content is loaded from the net and added to the cache)
  + load from cache (content is loaded from the cache if available - no 
cache validation)
  + cache-only (content is loaded from the cache only)
  + normal (content is loaded from the cache if valid)

  session history flags:
  --------------------
  + do not add to session history
  + replace current history entry
  + normal (add new session history entry)


These flags have several advantages over the current set of flags:
  * Better cache control - (ability to load *only* from cache, or to 
*not* cache at all)
  * Ability to control whether URI fixup occurs on the URI string..

One issue that i have is whether there should be flags to control 
"global history" as well as "session history".  Currently, there is no 
way to prevent URIs from being added to "global history" via these flags...

The current set of load flags can easily be represented as combinations 
of these new flags:

  LOAD_FLAG_IS_REFRESH   = "bypass cache"
  LOAD_FLAG_IS_LINK  = "bypass URI fixup..."
  LOAD_FLAG_BYPASS_HISTORY  = "do not add to session historty"
  LOAD_FLAG_REPLACE_HISTORY = "bypass URI fixup..." | "replace current 
history entry"
  LOAD_FLAG_BYPASS_CACHE  = "do not cache"
  LOAD_FLAG_BYPASS_PROXY  = "bypass proxy server"
  LOAD_FLAG_CHARSET_CHANGE  = "cache-only" | "replace current history 
entry" | "bypass URI fixup..."

Questions, comments?  let me know...

-- rick


Reply via email to