FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Is there a way to distinguish an auto-refresh from a manual page load?
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Is there a way to distinguish an auto-refresh from a manual page load? [message #177208 is a reply to message #177207] Mon, 27 February 2012 14:12 Go to previous messageGo to previous message
The Natural Philosoph is currently offline  The Natural Philosoph
Messages: 993
Registered: September 2010
Karma:
Senior Member
Á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.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: simplexml adding 'encoding' attribute to xml declaration
Next Topic: strtotime() not able to handle 04/29 correctly???
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Nov 28 11:04:30 GMT 2024

Total time taken to generate the page: 0.03680 seconds