Hi tadman,
That's a pretty good summary, but it leaves my original question:
What is the best way to Crush (to use your sub name) CGI parameters? MIME:Base64 is not suitable because it increases the length of the URL, I want to decrease it. I think a solution would have to take advantage of the format of CGI parameters.
Something that just popped into my head:
A scheme as mentioned by Dave, but instead of storing the whole parameter string against a unique ID, store the parameter names, order and format (string/integer). Then encode the URL as the ID, followed by the parameter values encoded depending on format.
For example, if the hash contains
Key: 1 Value: Action=<string>,Area=<int>,SubArea=<int>
Then the URL:
http://www.server.com/cgi-bin/script/script.pl?Action=view&Area=12345& +SubArea=12345
Could be encoded to:
http://www.server.com/cgi-bin/script/script.pl/SKLJSD
where "SKLJSD" can be decoded to 1,view,12345,12345
Comments? This avoids the problem of having to expire hash entries, because the hash contains only formats, which are likely to be a fairly small set.
-- Michael Snell
-- michael@snell.com
In reply to Re: Re: Encoding/compress CGI GET parameters
by snellm
in thread Encoding/compress CGI GET parameters
by snellm
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |