Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #11797
| Date | 2013-11-16 22:11 +0100 |
|---|---|
| From | Luuk <luuk@invalid.lan> |
| Newsgroups | comp.lang.php |
| Subject | Re: detecting refresh versus initial page load. |
| References | (3 earlier) <0.ed99647d2af0afac394a.20131116163857GMT.87vbzsqp26.fsf@bsb.me.uk> <5287a74a$0$9519$9b4e6d93@newsspool1.arcor-online.net> <kIOhu.450289$i75.196082@fx03.iad> <36qkla-t6f.ln1@luuk.invalid.lan> <mYOhu.267530$rL6.255958@fx14.iad> |
| Message-ID | <1l3lla-1eh.ln1@luuk.invalid.lan> (permalink) |
On 16-11-2013 19:38, Lew Pitcher wrote: > On Saturday 16 November 2013 13:30, in comp.lang.php, "Luuk" > <luuk@invalid.lan> wrote: > >> On 16-11-2013 19:21, Lew Pitcher wrote: >>> On Saturday 16 November 2013 12:11, in comp.lang.php, "Christoph Michael >>> Becker" <cmbecker69@arcor.de> wrote: >>> >>>> Ben Bacarisse wrote: >>>> >>>>> The Natural Philosopher <tnp@invalid.invalid> writes: >>>>> >>>>>> On 16/11/13 11:37, Ben Bacarisse wrote: >>>>>>> The Natural Philosopher <tnp@invalid.invalid> writes: >>>>>>> >>>>>>>> I want to make behave slightly different the first time you load it >>>>>>>> to when it refreshes itself - it auto refreshes using a meta refresh >>>>>>>> tag. >>>>>>> >>>>>>> If the page is "page.php" you can make the refresh link be something >>>>>>> like "page.php?refreshed=1". Would that do what you want? >>>>>>> >>>>>> >>>>>> But then it is going to refresh itself with the same parameters isn't >>>>>> it? >>>>> >>>>> Yes, that seems to meet the specification you gave, but if you want the >>>>> behaviour to be different every time, you can generate a different >>>>> number for 'refreshed' every time. This is, after all, a server- >>>>> generated page. >>>>> >>>>>> I don't think short of javascript as a replacement for >>>>>> <meta http-equiv="refresh" content="107" /> >>>>>> >>>>>> or whatever, there is any way to do this. >>>>> >>>>> Maybe I am misunderstanding what the "this" is. >>>> >>>> I assume that the OP is not aware that the content attribute optionally >>>> accepts a URI, e.g.: >>>> >>>> <meta http-equiv="refresh" content="5; url=http://example.com/"> >>> >>> More specifically, if the OP's page is >>> >>> http://example.com/mypage.php >>> >>> then he can code >>> >>> <meta http-equiv="refresh" content="5; >>> url=http://example.com/mypage.php?refreshed=1" /> >>> >>> and the php can then determine whether the meta refresh invoked the page >>> or not, by testing if it passed the "refreshed" option in the GET. >>> >>> Note that this does not help distinguish initial page loads from page >>> loads initiated by the browser's "Refresh" option (^R or equivalent). >>> >>> >> >> The code mentioned on stackoverflow.com seems more promissing: >> > http://stackoverflow.com/questions/15033899/js-difference-between-enter-page-and-refresh-page > > Which all appear to involve a Javascript solution. > > The OP asked for a solution that worked "WITHOUT cookies and/or Javascript". > > a WORKING solution is always better ;)
Back to comp.lang.php | Previous | Next — Previous in thread | Find similar | Unroll thread
detecting refresh versus initial page load. The Natural Philosopher <tnp@invalid.invalid> - 2013-11-16 09:18 +0000
Re: detecting refresh versus initial page load. Ben Bacarisse <ben.usenet@bsb.me.uk> - 2013-11-16 11:37 +0000
Re: detecting refresh versus initial page load. The Natural Philosopher <tnp@invalid.invalid> - 2013-11-16 15:34 +0000
Re: detecting refresh versus initial page load. Derek Turner <frderek@cesmail.net> - 2013-11-16 16:29 +0000
Re: detecting refresh versus initial page load. Ben Bacarisse <ben.usenet@bsb.me.uk> - 2013-11-16 16:38 +0000
Re: detecting refresh versus initial page load. Christoph Michael Becker <cmbecker69@arcor.de> - 2013-11-16 18:11 +0100
Re: detecting refresh versus initial page load. Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2013-11-16 13:21 -0500
Re: detecting refresh versus initial page load. Luuk <luuk@invalid.lan> - 2013-11-16 19:30 +0100
Re: detecting refresh versus initial page load. Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2013-11-16 13:38 -0500
Re: detecting refresh versus initial page load. Luuk <luuk@invalid.lan> - 2013-11-16 22:11 +0100
csiph-web