Meta refresh in Safari
am 29.12.2007 01:17:26 von guitarromantic
Am I right in thinking that this code doesn't work in Safari? I've
just written a PHP script for posting comments which uses a meta
refresh to reload the page so the user can't hit Reload and duplicate
their comment. I added a 'click here to continue' link underneath the
'you will now be redirected' message, but this isn't ideal - is there
any way to solve this besides using a header redirect? I don't really
want to do that since I'll have to strip all my PHP processing code
into a different file and such.
Matt
Re: Meta refresh in Safari
am 29.12.2007 01:30:06 von jkorpela
Scripsit Matt:
> Am I right in thinking that this code doesn't work in Safari?
"This code"? Please learn to post to Usenet. You're supposed to start
the message by telling what you are referring to. You're supposed to
post a URL if you have a specific page that you have a problem with.
Besides, meta refresh was never guaranteed to work, and has often been
advised against.
> I've
> just written a PHP script for posting comments which uses a meta
> refresh to reload the page so the user can't hit Reload and duplicate
> their comment.
You're on a wrong track. Please don't try to write some discussion forum
software before you have a fairly good idea of how the Web works.
Instead, use existing software to set up a forum. Better still, join
someone else's forum. There's no shortage of discussion forums that were
born dead and remain dead.
> I added a 'click here to continue' link underneath the
> 'you will now be redirected' message, but this isn't ideal -
It's a fairly good way to tell that the author of the page has no clue
on creating discussion forums.
--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/
Re: Meta refresh in Safari
am 29.12.2007 02:41:09 von rf
"Matt" wrote in message
news:2f09a658-fe5e-44bb-811e-b259100f3661@x69g2000hsx.google groups.com...
> Am I right in thinking that this code doesn't work in Safari? I've
> just written a PHP script for posting comments which uses a meta
> refresh to reload the page so the user can't hit Reload and duplicate
> their comment. I added a 'click here to continue' link underneath the
> 'you will now be redirected' message, but this isn't ideal - is there
> any way to solve this besides using a header redirect? I don't really
> want to do that since I'll have to strip all my PHP processing code
> into a different file and such.
The only reliable way to do the redirect is server side. Once you realize
this you would write your PHP accordingly. It's not much different, simply
do the redirect immediately after your existing PHP code updates the
database.
--
Richard.
Re: Meta refresh in Safari
am 02.01.2008 21:11:30 von guitarromantic
On 29 Dec 2007, 00:30, "Jukka K. Korpela" wrote:
> Scripsit Matt:
>
> > Am I right in thinking that this code doesn't work in Safari?
>
> "This code"? Please learn to post to Usenet. You're supposed to start
> the message by telling what you are referring to. You're supposed to
> post a URL if you have a specific page that you have a problem with.
Hi there. Thank you for your fairly rude response. I've been posting
on Usenet for quite a few years now, I think you simply misunderstood
me. When I said "this code", I meant a generic reference to the meta
refresh function in HTML which I assumed readers would be familiar
with. I wasn't trying to debug a specific line of code; I thought this
was obvious from my post. It was about a technique.
> > I've
> > just written a PHP script for posting comments which uses a meta
> > refresh to reload the page so the user can't hit Reload and duplicate
> > their comment.
>
> You're on a wrong track. Please don't try to write some discussion forum
> software before you have a fairly good idea of how the Web works.
> Instead, use existing software to set up a forum. Better still, join
> someone else's forum. There's no shortage of discussion forums that were
> born dead and remain dead.
Once again, I do not appreciate this tone. As it so happens, I'm using
an existing forum software (phpBB) to handle the process of posting
comments. I'm not writing a forum, but my site now has the ability to
utilise phpBB's forum functionality as an additional module to my own
self-written code. As far as I'm aware, it's as big of a Usenet faux
pas to start assuming about other people's problems and telling them
they're doing it wrong, as it is to ask for answers about code without
posting it.
> > I added a 'click here to continue' link underneath the
> > 'you will now be redirected' message, but this isn't ideal -
>
> It's a fairly good way to tell that the author of the page has no clue
> on creating discussion forums.
>
Oh really? You'd better inform the people from Invision, phpBB, YaBB,
et al.
@Richard: thank you for the useful response. I guess I'll have to bite
the bullet and do it that way.