2 questions about histor

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Aaron Fude

    #1

    2 questions about histor

    **** Post for FREE via your newsreader at post.usenet.com ****

    Hi,

    1. Is it possible to say "go back one page and refresh it"?

    2. Is it possible for link to replace the current page in the history stack?
    (This would make sense for clicking on the heading of a table to sort it.
    It's annoying to have to click Back thru all the sortings!)

    Thank you very much in advance,

    Aaron Fude



    -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    *** Usenet.com - The #1 Usenet Newsgroup Service on The Planet! ***
    Best Usenet Service Providers 2026 ranked by Newsgroup Access Newsservers, Usenet Search, Features & Free Trial. Add VPN for privacy.

    Unlimited Download - 19 Seperate Servers - 90,000 groups - Uncensored
    -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  • Randy Webb

    #2
    Re: 2 questions about histor

    Aaron Fude wrote:[color=blue]
    > **** Post for FREE via your newsreader at post.usenet.com ****
    >
    > Hi,
    >
    > 1. Is it possible to say "go back one page and refresh it"?[/color]

    history.go(-1);

    history.back();

    As for the refresh, that would have to be taken care of in the page you
    are going back to.
    [color=blue]
    > 2. Is it possible for link to replace the current page in the history stack?[/color]

    history.replace (URL to replace with)
    [color=blue]
    > (This would make sense for clicking on the heading of a table to sort it.
    > It's annoying to have to click Back thru all the sortings!)[/color]

    No, its better to have the onclick return false, and no navigation
    happen at all.

    <a href="noJS.html " onclick="sortFu nction();return false">Sort on this
    heading </a>

    Of course, it depends on how your sorting is happening. But trying to
    alter the history is a last resort.

    Comment

    • Aaron Fude

      #3
      Re: 2 questions about histor


      "Randy Webb" <HikksNotAtHome @aol.com> wrote in message
      news:Qs2dnbujWI PaU5Xc4p2dnA@co mcast.com...[color=blue]
      > Aaron Fude wrote:[color=green]
      > > **** Post for FREE via your newsreader at post.usenet.com ****
      > >
      > > Hi,
      > >
      > > 1. Is it possible to say "go back one page and refresh it"?[/color]
      >
      > history.go(-1);
      >
      > history.back();
      >
      > As for the refresh, that would have to be taken care of in the page you
      > are going back to.
      >[color=green]
      > > 2. Is it possible for link to replace the current page in the history[/color][/color]
      stack?[color=blue]
      >
      > history.replace (URL to replace with)
      >[/color]

      Doesn't work for me...

      I have

      <a href=""
      onClick="histor y.replace('/srv/Filter.jsp?Type =0&Query=sion&S ortBy=1&SortDir
      =1'); return false;">Info</a>

      and javascript is ignored entirely.

      What's the level of support for history.replace ?

      Aaron[color=blue][color=green]
      > > (This would make sense for clicking on the heading of a table to sort[/color][/color]
      it.[color=blue][color=green]
      > > It's annoying to have to click Back thru all the sortings!)[/color]
      >
      > No, its better to have the onclick return false, and no navigation
      > happen at all.
      >
      > <a href="noJS.html " onclick="sortFu nction();return false">Sort on this
      > heading </a>
      >
      > Of course, it depends on how your sorting is happening. But trying to
      > alter the history is a last resort.[/color]


      Comment

      • Thomas 'PointedEars' Lahn

        #4
        Re: 2 questions about histor

        Aaron Fude wrote:[color=blue]
        > "Randy Webb" <HikksNotAtHome @aol.com> wrote [...][color=green]
        >> Aaron Fude wrote:[color=darkred]
        >> > 2. Is it possible for link to replace the current page in the history[/color][/color]
        > stack?[/color]
        ^^^[color=blue][color=green]
        >>
        >> history.replace (URL to replace with)[/color]
        >
        > Doesn't work for me...[/color]

        "Does not work" is a useless error description. [psf 4.11]
        [color=blue]
        > I have
        >
        > <a href=""[/color]

        You must at least use href="#", the attribute value must be of type %URI.
        [color=blue]
        > onClick="histor y.replace('/srv/Filter.jsp?Type =0&Query=sion&S ortBy=1&SortDir
        > =1'); return false;">Info</a>[/color]

        This is a J(ava)Script-only link but it could be made an as-well-link easily:

        <a href="/srv/Filter.jsp?Type =0&Query=sion&S ortBy=1&SortDir =1"
        onClick="histor y.replace(this. href); return false;">Info</a>
        [color=blue]
        > and javascript is ignored entirely.[/color]

        It most certainly is not ignored. Most certainly there are
        script errors that are not displayed. Read the FAQ on debugging.
        [color=blue]
        > What's the level of support for history.replace ?[/color]

        The same as for top-posting and borken quoting, read the FAQ.

        Seriously, I do not know of any DOM where there is history.replace ().
        However, there is location.replac e().


        PointedEars

        Comment

        • Michael Winter

          #5
          Re: 2 questions about histor

          On Sat, 31 Jul 2004 18:32:16 +0200, Thomas 'PointedEars' Lahn
          <PointedEars@nu rfuerspam.de> wrote:
          [color=blue]
          > Aaron Fude wrote:[/color]

          [snip]
          [color=blue][color=green]
          >> I have
          >>
          >> <a href=""[/color]
          >
          > You must at least use href="#",[/color]

          Wrong. Read RFC 2396. An empty string resolves to the top of the current
          document. What you are suggesting is equivalent.
          [color=blue]
          > the attribute value must be of type %URI.[/color]

          Although it isn't represented in the BNF, an empty URI is described
          explicitly in Section 4.2 (Same-document references) and Appendix C.2
          (Abnormal Examples).
          The value was also specified in RFC 1808, but there an empty URI resolved
          to the complete base URI.

          Mike

          --
          Michael Winter
          Replace ".invalid" with ".uk" to reply

          Comment

          • Grant Wagner

            #6
            Re: 2 questions about histor

            Michael Winter wrote:
            [color=blue]
            > On Sat, 31 Jul 2004 18:32:16 +0200, Thomas 'PointedEars' Lahn
            > <PointedEars@nu rfuerspam.de> wrote:
            >[color=green]
            > > Aaron Fude wrote:[/color]
            >
            > [snip]
            >[color=green][color=darkred]
            > >> I have
            > >>
            > >> <a href=""[/color]
            > >
            > > You must at least use href="#",[/color]
            >
            > Wrong. Read RFC 2396. An empty string resolves to the top of the current
            > document. What you are suggesting is equivalent.[/color]

            Maybe according to RFC 2396 they are equivalent, but as we all know, browsers
            don't necessarily conform to specifications:

            Clicking <a href="">Test</a> results in the following behavior:
            IE6SP1 and Netscape 4.78 load the default page from the current directory. In
            other words, if <a href=""> is on "somepage.html" , clicking the link results
            in "index.html " being loaded. If there is no default page on the server (and
            the server allows directory browsing) then you get a list of files in the
            current directory. This can be confirmed by viewing the contents of the
            status bar when hovering over the "Test" link. Firefox 0.9.2, Opera 6.05 and
            Opera 7.53 reload the current document.

            Given that at least one of the major browsers (some would consider it _the_
            major browser) does not act correctly on href="", and href="" could be
            followed with completely unexpected behavior if client-side JavaScript is
            disabled, it seems prudent to use href="#".

            --
            Grant Wagner <gwagner@agrico reunited.com>
            comp.lang.javas cript FAQ - http://jibbering.com/faq

            Comment

            • Michael Winter

              #7
              Re: 2 questions about histor

              On Tue, 03 Aug 2004 17:36:55 GMT, Grant Wagner
              <gwagner@agrico reunited.com> wrote:

              [snip]
              [color=blue]
              > Maybe according to RFC 2396 they are equivalent, but as we allknow,
              > browsers don't necessarily conform to specifications:
              >
              > Clicking <a href="">Test</a> results in the following behavior:IE6SP1
              > and Netscape 4.78 load the default page from the currentdirector y. In
              > other words, if <a href=""> is on "somepage.html" ,clicking the link
              > results in "index.html " being loaded. If there isno default page on the
              > server (and the server allows directorybrowsi ng) then you get a list of
              > files in the current directory.This can be confirmed by viewing the
              > contents of the status barwhen hovering over the "Test" link. Firefox
              > 0.9.2, Opera 6.05 and
              > Opera 7.53 reload the current document.
              >
              > Given that at least one of the major browsers (some would considerit
              > _the_ major browser) does not act correctly on href="", andhref="" could
              > be followed with completely unexpected behavior ifclient-side JavaScript
              > is disabled, it seems prudent to usehref="#".[/color]

              Well, what can I say?

              The argument I was expecting was that RFCs aren't formal documents (which
              I know) so there's no *need* to comply. However, the counter, and a
              reasonable one I think in this case, is that the expected behaviour - use
              the current document (or base URI with the older scheme) - would surely be
              so easy to implement that no-one in their right mind would choose to do
              otherwise. Nothing complicated. Nothing demanding. Just simplicity itself.
              Oh, how naive I must be.

              Whilst I can't say that I'm surprised that Microsoft don't comply, I am
              surprised that Netscape did. At least they do now, not that it really
              matters, I suppose, with that browser-like monstrosity misbehaving.

              Mike


              Hating Microsoft more by the day.

              --
              Michael Winter
              Replace ".invalid" with ".uk" to reply by e-mail

              Comment

              • Thomas 'PointedEars' Lahn

                #8
                Re: 2 questions about histor

                Grant Wagner wrote:
                [color=blue]
                > Michael Winter <M.Winter@bluey onder.co.invali d> wrote:[/color]
                ^^^^^^^^[color=blue][color=green]
                >> [...] Thomas 'PointedEars' Lahn [...][color=darkred]
                >> > You must at least use href="#",[/color]
                >>
                >> Wrong. Read RFC 2396.[/color][/color]

                I suggest you read

                - RFC 2822, section 3.4
                - RFC 1036, section 2.1.1.
                - RFC 2606, section 2

                and last but not least

                - RFC 1855, section 2.1.1.

                in the first place :->
                [color=blue][color=green]
                >> An empty string resolves to the top of the current document.[/color][/color]

                Nevertheless, thank you for pointing this out. While Section 4.2. is
                enlightening (and note the numbers :)), Appendix A is strengthening it
                and finally Appendix B clearly identifies the "#" to be optional, too.
                I stand corrected regarding my RFC 2396 references on this issue, if I
                did any. Yet ...
                [color=blue][color=green]
                >> What you are suggesting is equivalent.[/color]
                >
                > Maybe according to RFC 2396 they are equivalent, but as we all know,
                > browsers don't necessarily conform to specifications:
                > [...][/color]

                Thank you for testing, too.


                PointedEars

                Comment

                • Michael Winter

                  #9
                  Re: 2 questions about histor

                  On Sat, 07 Aug 2004 04:10:22 +0200, Thomas 'PointedEars' Lahn
                  <PointedEars@we b.de> wrote:
                  [color=blue][color=green]
                  >> Michael Winter <M.Winter@bluey onder.co.invali d> wrote:[/color]
                  > ^^^^^^^^[/color]

                  [snip]
                  [color=blue]
                  > I suggest you read
                  >
                  > - RFC 2822, section 3.4
                  > - RFC 1036, section 2.1.1.
                  > - RFC 2606, section 2
                  >
                  > and last but not least
                  >
                  > - RFC 1855, section 2.1.1.
                  >
                  > in the first place :->[/color]

                  And what exactly is wrong with my use of the invalid TLD? From RFC 2606:

                  ".invalid" is intended for use in online construction of domain
                  names that are sure to be invalid and which it is obvious at a
                  glance are invalid.

                  I intend for my e-mail address to be unusable without human intervention,
                  so I use .invalid to make it "obvious at a glance".

                  Let's face facts here:

                  1) People do e-mail me in response to posts to this group, so munging my
                  address can't really be all that harmful.
                  2) I'm not going to change my mind. If, some day, someone posts in this
                  group that they couldn't e-mail me, so they resorted to posting to the
                  group, I *might* reconsider. But until then, I see no need.

                  This isn't the first time that you've mentioned this to me, but I do hope
                  it will be the last.

                  By the way, is there anything in particular about my messaging etiquette
                  that you don't like? As far as I can tell, there are only minor points
                  that result from forgetfulness, rather than ignorance:

                  - Sometimes I'm overly lenient with what I trim.
                  - I rarely check if a message is cross-posted, but once I know, I always
                  set follow-ups.
                  - I can be overly terse, instead of brief.
                  - I limit my line length to 70 characters, rather than 65. However, even
                  that limit has to be done by hand: Opera uses 74 and I don't know if I can
                  change that.

                  I don't think any of those require a referral to netiquette guidelines.

                  [snip]

                  Mike

                  --
                  Michael Winter
                  Replace ".invalid" with ".uk" to reply by e-mail

                  Comment

                  • Thomas 'PointedEars' Lahn

                    #10
                    Re: 2 questions about histor

                    Michael Winter wrote:
                    [color=blue]
                    > On Sat, 07 Aug 2004 04:10:22 +0200, Thomas 'PointedEars' Lahn
                    > <PointedEars@we b.de> wrote:[/color]

                    Please do not write attribution novels, see
                    <http://netmeister.org/news/learn2quote.htm l>
                    as referred to by the FAQ of this newsgroup.
                    [color=blue][color=green][color=darkred]
                    >>> Michael Winter <M.Winter@bluey onder.co.invali d> wrote:[/color]
                    >> ^^^^^^^^[/color]
                    >
                    > [snip]
                    >[color=green]
                    >> I suggest you read
                    >>
                    >> - RFC 2822, section 3.4
                    >> - RFC 1036, section 2.1.1.
                    >> - RFC 2606, section 2
                    >>
                    >> and last but not least
                    >>
                    >> - RFC 1855, section 2.1.1.
                    >>
                    >> in the first place :->[/color]
                    >
                    > And what exactly is wrong with my use of the invalid TLD? From RFC 2606:
                    >
                    > ".invalid" is intended for use in online construction of domain
                    > names that are sure to be invalid and which it is obvious at a
                    > glance are invalid.[/color]

                    It is wrong because of

                    | 2. TLDs for Testing, & Documentation Examples

                    a few paragraphs above in the same RFC and because of the other RFCs.
                    Namely it does not refer to a mailbox as the From (and Reply-To)
                    address(es) MUST and it does not make it easy for the reader to reply
                    as the Netiquette recommends.


                    PointedEars

                    Comment

                    • Richard Cornford

                      #11
                      Re: 2 questions about histor

                      Thomas 'PointedEars' Lahn wrote:
                      <snip>[color=blue]
                      > Please do not write attribution novels, see
                      > <http://netmeister.org/news/learn2quote.htm l>
                      > as referred to by the FAQ of this newsgroup.[/color]

                      That URL is *not* referred to by the FAQ of this newsgroup. The nearest
                      link is:-

                      <URL: http://www.netmeister.org/news/learn2quote2.html >
                      ^

                      You are apparently geniality alone in being the only contributor to this
                      group to have any attitude about restricting the length of attribution
                      lines. Much as you are the only person who cares at all about the
                      validity of e-mail addresses used in posts.

                      Richard.


                      Comment

                      • Randy Webb

                        #12
                        Re: 2 questions about histor

                        Richard Cornford wrote:
                        [color=blue]
                        > Thomas 'PointedEars' Lahn wrote:
                        > <snip>
                        >[color=green]
                        >>Please do not write attribution novels, see
                        >><http://netmeister.org/news/learn2quote.htm l>
                        >>as referred to by the FAQ of this newsgroup.[/color]
                        >
                        >
                        > That URL is *not* referred to by the FAQ of this newsgroup. The nearest
                        > link is:-
                        >
                        > <URL: http://www.netmeister.org/news/learn2quote2.html >
                        > ^
                        >
                        > You are apparently geniality alone in being the only contributor to this
                        > group to have any attitude about restricting the length of attribution
                        > lines. Much as you are the only person who cares at all about the
                        > validity of e-mail addresses used in posts.[/color]

                        What makes his e-mail campaign so ludicrously funny is that mine is a
                        very valid email address, but he (nor anyone else not on AOL) can send
                        me an email. Which begs the question "What point is a valid email
                        address even if you can't email it?" Yet he has never said one word
                        about mine......

                        --
                        Randy

                        Comment

                        Working...