Meta refresh in Safari

M

Matt

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
 
J

Jukka K. Korpela

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.
 
R

rf

Matt said:
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.
 
M

Matt

Scripsit Matt:


"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.

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.
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,816
Latest member
SapanaCarpetStudio

Latest Threads

Top