Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #4931 > unrolled thread

Is there a way to distinguish an auto-refresh from a manual page load?

Started byThe Natural Philosopher <tnp@invalid.invalid>
First post2012-02-22 22:26 +0000
Last post2012-02-27 11:59 -0500
Articles 3 on this page of 23 — 9 participants

Back to article view | Back to comp.lang.php


Contents

  Is there a way to distinguish an auto-refresh from a manual page load? The Natural Philosopher <tnp@invalid.invalid> - 2012-02-22 22:26 +0000
    Re: Is there a way to distinguish an auto-refresh from a manual page load? Scott Johnson <noonehome@chalupasworld.com> - 2012-02-22 16:27 -0800
    Re: Is there a way to distinguish an auto-refresh from a manual page load? Jerry Stuckle <jstucklex@attglobal.net> - 2012-02-22 22:49 -0500
    Re: Is there a way to distinguish an auto-refresh from a manual page load? "Álvaro G. Vicario" <alvaro.NOSPAMTHANX@demogracia.com.invalid> - 2012-02-24 13:40 +0100
      Re: Is there a way to distinguish an auto-refresh from a manual page load? The Natural Philosopher <tnp@invalid.invalid> - 2012-02-24 13:26 +0000
        Re: Is there a way to distinguish an auto-refresh from a manual page load? bill <nobody@spamcop.net> - 2012-02-25 07:56 -0500
          Re: Is there a way to distinguish an auto-refresh from a manual page load? "Beauregard T. Shagnasty" <a.nony.mous@example.invalid> - 2012-02-25 17:21 +0000
            Re: Is there a way to distinguish an auto-refresh from a manual page load? crankypuss <no@email.thanks> - 2012-02-26 01:31 -0700
              Re: Is there a way to distinguish an auto-refresh from a manual page load? The Natural Philosopher <tnp@invalid.invalid> - 2012-02-26 12:25 +0000
                Re: Is there a way to distinguish an auto-refresh from a manual page load? crankypuss <no@email.thanks> - 2012-02-26 11:08 -0700
                  Re: Is there a way to distinguish an auto-refresh from a manual page   load? "J.O. Aho" <user@example.net> - 2012-02-26 19:40 +0100
                    Re: Is there a way to distinguish an auto-refresh from a manual page load? crankypuss <no@email.thanks> - 2012-02-26 13:06 -0700
                      Re: Is there a way to distinguish an auto-refresh from a manual page load? The Natural Philosopher <tnp@invalid.invalid> - 2012-02-26 21:12 +0000
                  Re: Is there a way to distinguish an auto-refresh from a manual page load? "Peter H. Coffin" <hellsop@ninehells.com> - 2012-02-26 12:44 -0600
                    Re: Is there a way to distinguish an auto-refresh from a manual page load? crankypuss <no@email.thanks> - 2012-02-26 13:09 -0700
                      Re: Is there a way to distinguish an auto-refresh from a manual page load? The Natural Philosopher <tnp@invalid.invalid> - 2012-02-26 21:14 +0000
                        Re: Is there a way to distinguish an auto-refresh from a manual page load? crankypuss <no@email.thanks> - 2012-02-27 04:02 -0700
        Re: Is there a way to distinguish an auto-refresh from a manual page load? "Álvaro G. Vicario" <alvaro.NOSPAMTHANX@demogracia.com.invalid> - 2012-02-27 10:22 +0100
          Re: Is there a way to distinguish an auto-refresh from a manual page load? The Natural Philosopher <tnp@invalid.invalid> - 2012-02-27 12:00 +0000
            Re: Is there a way to distinguish an auto-refresh from a manual page load? "Álvaro G. Vicario" <alvaro.NOSPAMTHANX@demogracia.com.invalid> - 2012-02-27 14:08 +0100
              Re: Is there a way to distinguish an auto-refresh from a manual page load? The Natural Philosopher <tnp@invalid.invalid> - 2012-02-27 14:12 +0000
                Re: Is there a way to distinguish an auto-refresh from a manual page load? "Álvaro G. Vicario" <alvaro.NOSPAMTHANX@demogracia.com.invalid> - 2012-02-27 17:18 +0100
                  Re: Is there a way to distinguish an auto-refresh from a manual page load? Jerry Stuckle <jstucklex@attglobal.net> - 2012-02-27 11:59 -0500

Page 2 of 2 — ← Prev page 1 [2]


#5027

FromThe Natural Philosopher <tnp@invalid.invalid>
Date2012-02-27 14:12 +0000
Message-ID<jig30n$sio$1@news.albasani.net>
In reply to#5026
Álvaro G. Vicario wrote:
> El 27/02/2012 13:00, The Natural Philosopher escribió/wrote:
>>>> Well I used a meta tag so that the client refreshes in case new info 
>>>> has
>>>> come in.
>>>>
>>>> However in this case the client can also POST new information, and I
>>>> don't want it POSTING the same information every 5 minutes or whatever.
>>>
>>> Then, it should be enough to use two different URLs, one of the <meta>
>>> tag and one for the action attribute in the form. Even if they
>>> actually point to the same file, the browser has no way to know.
>>>
>>
>> Well that is the problem isn't it? The browser cannot KNOW. If I POST a
>> form to mypostingtarget.php and THAT comes back with a 'meta refresh'
>> statement THAT is the target that is going to be refreshed?.
> 
> Okay, I think I finally see what the problem is.
> 
> The complete syntax for a <meta> direct is this:
> 
> https://developer.mozilla.org/en/HTML/Element/meta#attr-http-equiv
> 
> In the "refresh" bit we can read:
> 
> «This pragma specifies:
> 
> - the number of seconds until the page should be reloaded, if the 
> content attribute contains only a positive integer number;
> 
> - the number of seconds until the page should be redirected to another, 
> if the content attribute contains a positive integer number followed by 
> the string ';url=' and a valid URL.»
> 
> I guess you are using the first feature ("reload") and I thought you 
> were using the second one ("redirect"). Just tweak your PHP code to 
> generate a <meta> tag with the ";url=" part.
> 
> 

Oh, so what you are saying is that a POST operation generates a page 
that has a redirect back to  the page that produced the POST *request* 
not the *result*, but then that *is* the page that if refreshed again 
will POST again.. ;-0)


Or is it the other way around..bu that doesn't work either if you DO 
want to post.

No. I think the answer lies in the manure heap of Javashite. Take 
control of either the refresh process or the updating by another means 
like websockets or Ajax.


[toc] | [prev] | [next] | [standalone]


#5028

From"Álvaro G. Vicario" <alvaro.NOSPAMTHANX@demogracia.com.invalid>
Date2012-02-27 17:18 +0100
Message-ID<jigad6$5cv$1@dont-email.me>
In reply to#5027
El 27/02/2012 15:12, The Natural Philosopher escribió/wrote:
>>> Well that is the problem isn't it? The browser cannot KNOW. If I POST a
>>> form to mypostingtarget.php and THAT comes back with a 'meta refresh'
>>> statement THAT is the target that is going to be refreshed?.
>>
>> Okay, I think I finally see what the problem is.
>>
>> The complete syntax for a <meta> direct is this:
>>
>> https://developer.mozilla.org/en/HTML/Element/meta#attr-http-equiv
>>
>> In the "refresh" bit we can read:
>>
>> «This pragma specifies:
>>
>> - the number of seconds until the page should be reloaded, if the
>> content attribute contains only a positive integer number;
>>
>> - the number of seconds until the page should be redirected to
>> another, if the content attribute contains a positive integer number
>> followed by the string ';url=' and a valid URL.»
>>
>> I guess you are using the first feature ("reload") and I thought you
>> were using the second one ("redirect"). Just tweak your PHP code to
>> generate a <meta> tag with the ";url=" part.
>>
>>
>
> Oh, so what you are saying is that a POST operation generates a page
> that has a redirect back to the page that produced the POST *request*
> not the *result*, but then that *is* the page that if refreshed again
> will POST again.. ;-0)

I'm just saying that:

1. A redirect always triggers a GET request.
2. It's _your_ page and _you_ control what URL is written into the 
<meta> tag.

Honestly, I'm completely lost as about what's not clear so far.



-- 
-- http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web: http://borrame.com
-- Mi web de humor satinado: http://www.demogracia.com
--

[toc] | [prev] | [next] | [standalone]


#5029

FromJerry Stuckle <jstucklex@attglobal.net>
Date2012-02-27 11:59 -0500
Message-ID<jigcq4$ll6$1@dont-email.me>
In reply to#5028
On 2/27/2012 11:18 AM, "Álvaro G. Vicario" wrote:
> El 27/02/2012 15:12, The Natural Philosopher escribió/wrote:
>>>> Well that is the problem isn't it? The browser cannot KNOW. If I POST a
>>>> form to mypostingtarget.php and THAT comes back with a 'meta refresh'
>>>> statement THAT is the target that is going to be refreshed?.
>>>
>>> Okay, I think I finally see what the problem is.
>>>
>>> The complete syntax for a <meta> direct is this:
>>>
>>> https://developer.mozilla.org/en/HTML/Element/meta#attr-http-equiv
>>>
>>> In the "refresh" bit we can read:
>>>
>>> «This pragma specifies:
>>>
>>> - the number of seconds until the page should be reloaded, if the
>>> content attribute contains only a positive integer number;
>>>
>>> - the number of seconds until the page should be redirected to
>>> another, if the content attribute contains a positive integer number
>>> followed by the string ';url=' and a valid URL.»
>>>
>>> I guess you are using the first feature ("reload") and I thought you
>>> were using the second one ("redirect"). Just tweak your PHP code to
>>> generate a <meta> tag with the ";url=" part.
>>>
>>>
>>
>> Oh, so what you are saying is that a POST operation generates a page
>> that has a redirect back to the page that produced the POST *request*
>> not the *result*, but then that *is* the page that if refreshed again
>> will POST again.. ;-0)
>
> I'm just saying that:
>
> 1. A redirect always triggers a GET request.
> 2. It's _your_ page and _you_ control what URL is written into the
> <meta> tag.
>
> Honestly, I'm completely lost as about what's not clear so far.
>
>
>

You forget who you're talking to, Álvaro.

How about taking this offline?  It has nothing to do with PHP.

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

[toc] | [prev] | [standalone]


Page 2 of 2 — ← Prev page 1 [2]

Back to top | Article view | comp.lang.php


csiph-web