刷新没有请求参数? [英] refresh without request parameters?

查看:69
本文介绍了刷新没有请求参数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我有一个问题:我有一个带有一些按钮的表格。当按下其中一个

按钮时,一个新的URL带有一些参数,例如:从数据库中删除一些

。问题是,当用户按下刷新时,同样会再次使用参数来触发刷新URL - 这有时会给出

奇怪的行为。

重新加载页面以便只删除网页时,有什么办法可以规定参数吗?

http://myserver/mypage.jsp?delete = yes


成为

http://myserver/mypage.jsp


或者应该以其他方式处理吗?


问候

Bo

Hi,

I have a problem : I have a form with some buttons. When one of these
buttons is pressed a new URL with some parameters to e.g. delete something
from a database. The problem is that when the user presses refresh that same
URL is fired with the parameters to delete again - this sometimes gives
strange behaviour. Is there any way that I can stip of parameters when
reloading a page such that only the webpage is deleted e.g.

http://myserver/mypage.jsp?delete=yes

becomes

http://myserver/mypage.jsp

Or should this be handled some other way??

Regards
Bo

推荐答案

在8/10/04 2:10 pm,Bo Rasmussen写道:
On 8/10/04 2:10 pm, Bo Rasmussen wrote:


我有一个问题:我有一个带有一些按钮的表单。当按下这些
按钮之一时,新的URL带有一些参数,例如:从数据库中删除某些内容。问题是,当用户按下刷新时,会再次使用要删除的参数触发相同的URL - 这有时会产生奇怪的行为。
重新加载页面以便只删除网页时,有什么办法可以规定参数吗?

http://myserver/mypage.jsp?delete = yes

成为

http://myserver/mypage.jsp

或者应该处理其他方式??
Hi,

I have a problem : I have a form with some buttons. When one of these
buttons is pressed a new URL with some parameters to e.g. delete something
from a database. The problem is that when the user presses refresh that same
URL is fired with the parameters to delete again - this sometimes gives
strange behaviour. Is there any way that I can stip of parameters when
reloading a page such that only the webpage is deleted e.g.

http://myserver/mypage.jsp?delete=yes

becomes

http://myserver/mypage.jsp

Or should this be handled some other way??




向Google询问有关cookie和会话ID的信息。


-

Philip Ronan
ph *********** @ virgin.net

(如果通过电子邮件回复,请删除z)



Ask Google about cookies and session IDs.

--
Philip Ronan
ph***********@virgin.net
(Please remove the "z"s if replying by email)


嗨菲利普,


你能否勾勒出一个解决方案应该是什么样子 - 在我开始研究我得到的大量点击之前,这会有很多帮助

来自谷歌?提前致谢


问候

Bo Rasmussen

" Philip Ronan" < pH值*********** @ virgin.net>在消息中写道

新闻:BD8C5160.2333F%ph *********** @ virgin.net ...
Hi Philip,

Could you please sketch what a solution should look like - that would help
me a lot before I start looking into the large number of hits I get from
from google? Thanks in advance

Regards
Bo Rasmussen
"Philip Ronan" <ph***********@virgin.net> wrote in message
news:BD8C5160.2333F%ph***********@virgin.net...
8/10/04下午2:10,Bo Rasmussen写道:
On 8/10/04 2:10 pm, Bo Rasmussen wrote:


我有一个问题:我有一个带有一些按钮的表单。当按下这些
按钮之一时,新的URL带有一些参数,例如:从数据库中删除
。问题是,当用户按下刷新
时,相同的URL会被再次删除的参数触发 - 这有时会带来奇怪的行为。
重新加载页面以便只删除网页时,有什么办法可以规定参数吗?

http://myserver/mypage.jsp?delete = yes

成为

http://myserver/mypage.jsp

或者应该处理其他方式??
Hi,

I have a problem : I have a form with some buttons. When one of these
buttons is pressed a new URL with some parameters to e.g. delete something from a database. The problem is that when the user presses refresh that same URL is fired with the parameters to delete again - this sometimes gives
strange behaviour. Is there any way that I can stip of parameters when
reloading a page such that only the webpage is deleted e.g.

http://myserver/mypage.jsp?delete=yes

becomes

http://myserver/mypage.jsp

Or should this be handled some other way??



向Google询问有关Cookie和会话ID的信息。

-
Philip Ronan
ph *********** @ virgin.net
(请删除 z如果通过电子邮件回复



Ask Google about cookies and session IDs.

--
Philip Ronan
ph***********@virgin.net
(Please remove the "z"s if replying by email)



" Bo Rasmussen"写了
"Bo Rasmussen" wrote
我有一个问题:我有一个带有一些按钮的表单。当按下这些
按钮之一时,新的URL带有一些参数,例如:从数据库中删除某些内容。问题是,当用户按下刷新
时,相同的URL会被再次删除的参数触发 - 这有时会带来奇怪的行为。
重新加载页面以便只删除网页时,有什么办法可以规定参数吗?

http://myserver/mypage.jsp?delete = yes

成为

http://myserver/mypage.jsp

或者应该处理其他方式??
I have a problem : I have a form with some buttons. When one of these
buttons is pressed a new URL with some parameters to e.g. delete something
from a database. The problem is that when the user presses refresh that same URL is fired with the parameters to delete again - this sometimes gives
strange behaviour. Is there any way that I can stip of parameters when
reloading a page such that only the webpage is deleted e.g.

http://myserver/mypage.jsp?delete=yes

becomes

http://myserver/mypage.jsp

Or should this be handled some other way??




绝对。这正是他们发明GET和POST作为两种非常好的b $ b不同表单提交方法的原因。 GET方法,参数附加

到一个url,从数据库请求信息时很好,但是要修改那个数据库应该总是使用POST。拼出的网址是

加入书签,显示在推荐人日志中,一些蜘蛛解释GET表格,

....如果Googlebot每次抓取您的网页时会出现什么情况已从您的数据库中删除



HTH

-

Ivo



Absolutely. This is exactly why they invented GET and POST as two very
different forms submission methods. The GET method, with parameters attched
to an url, is fine when requesting information from a database, but to
modify that database one should always use POST. Spelled out url''s are
bookmarked, show up in referrer logs, some spiders interpret GETted forms,
.... What if everytime the Googlebot crawled your page something was deleted
from your database?
HTH
--
Ivo


这篇关于刷新没有请求参数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆