[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lynx-dev Re: [patch] LYNXMESSAGES:/ without temp-files

From: Leonid Pauzner
Subject: Re: lynx-dev Re: [patch] LYNXMESSAGES:/ without temp-files
Date: Tue, 19 Oct 1999 19:35:43 +0400 (MSD)

19-Oct-99 08:18 Klaus Weide wrote:
>> In fact, anchor->no_cache = TRUE have no effect so far: when I visit
>> LYNXMESSAGES:/ next time I saw the old output unless I press ^R to reload.

> Hmm, I would have to gdb it to see why that happens.  From looking
> at the code, it seems it *should* work as you did it.

It *is* working due to LYforce_*/LYoverride_* set in getfile().
Perhaps "internal links" were triggered in a strange way - I don't know.
Check HTLoadDocument() from HTAccess.c:

    **  See if we can use an already loaded document.
    if (!LYforce_no_cache && (text = (HText *)HTAnchor_document(anchor))) {
        **  We have a cached rendition of the target document.
        **  Check if it's OK to re-use it.  We consider it OK if:
        **   (1) the anchor does not have the no_cache element set, or
        **   (2) we've overridden it, e.g., because we are acting on
        **       a PREV_DOC command or a link in the History Page and
        **       it's not a reply from a POST with the LYresubmit_posts
        **       flag set, or
        **   (3) we are repositioning within the currently loaded document
        **       based on the target anchor's address (URL_Reference).
        *    If DONT_TRACK_INTERNAL_LINKS is defined, HText_AreDifferent()
        *    is used to determine whether (3) applies.  If the target address
        *    differs from that of the current document only by a fragment
        *    and the target address has an appended fragment, repositioning
        *    without reloading is always assumed.
        *    Note that HText_AreDifferent() currently always returns TRUE
        *    if the target has a LYNXIMGMAP URL, so that an internally
        *    generated pseudo-document will normally not be re-used unless
        *    condition (2) applies. (Condition (1) cannot apply since in
        *    LYMap.c, no_cache is always set in the anchor object).  This
        *    doesn't guarantee that the resource from which the MAP element
        *    is taken will be read again (reloaded) when the list of links
        *    for a client-side image map is regenerated, when in some cases
        *    it should (e.g., user requested RELOAD, or HTTP response with
        *    no-cache header and we are not overriding).
        *    If DONT_TRACK_INTERNAL_LINKS is undefined, a target address that
        *    points to the same URL as the current document may still result in
        *    reloading, depending on whether the original URL-Reference
        *    was given as an internal link in the context of the previously
        *    loaded document.  HText_AreDifferent() is not used here for
        *    testing whether we are just repositioning.  For an internal
        *    link, the potential callers of this function from mainloop()
        *    down will either avoid making the call (and do the repositioning
        *    differently) or set LYinternal_flag (or LYoverride_no_cache).
        *    Note that (a) LYNXIMGMAP pseudo-documents and (b) The "List Page"
        *    document are treated logically as being part of the document on
        *    which they are based, for the purpose of whether to treat a link
        *    as internal, but the logic for this (by setting LYinternal_flag
        *    as necessary) is implemented elsewhere.  There is a specific
        *    test for LYNXIMGMAP here so that the generated pseudo-document
        *    will not be re-used unless LYoverride_no_cache is set.  The same
        *    caveat as above applies w.r.t. reloading of the underlying
        *    resource.
        **  We also should be checking other aspects of cache
        **  regulation (e.g., based on an If-Modified-Since check,
        **  etc.) but the code for doing those other things isn't
        **  available yet.
        if (LYoverride_no_cache || !HText_hasNoCacheSet(text) ||
            !HText_AreDifferent(anchor, full_address))
        if (LYoverride_no_cache ||
            ((LYinternal_flag || !HText_hasNoCacheSet(text)) &&
             strncmp(full_address, "LYNXIMGMAP:", 11)))
            CTRACE((tfp, "HTAccess: Document already in memory.\n"));

            if (HTAnchor_format(anchor) == WWW_DIRED)
                lynx_edit_mode = TRUE;
            redirection_attempts = 0;
            return YES;
        } else {
            ForcingNoCache = YES;
            CTRACE((tfp, "HTAccess: Auto-reloading document.\n"));

reply via email to

[Prev in Thread] Current Thread [Next in Thread]