0

我一直在工作的一个网站几乎完全是链接回自身的表单输入。我希望用户能够为特定设置添加书签,并在他访问时自动将它们放在那里。问题是这会导致 URL 很长(几乎 500 个字符)。有什么办法可以缩短 GET URL?

大多数变量都是一个简单的开/关开关,所以我不需要跟踪很多细节。

4

2 回答 2

0

You're nowhere near the limit of URL length (around 2000 as of this writing).

However, you should really cookie/session this information or -- if they must be able to easily switch to a different browser/machine -- roll your own URL shortener (just create a unique key that is appended to every request and get the variables associated with that key from a database).

于 2013-09-06T01:04:50.890 回答
0

您可以使用http://yourls.org - 一组 php 脚本,可让您跟踪短网址,例如商业 bit.ly

于 2013-09-06T01:00:03.837 回答