Friday, June 6, 2014

Re: In order to make the url bookmarkable, sometimes we need long parameters but IE max url length is only about 2000, How to deal with it?

Other solution is encoding.

Can we build an encoding system that can encode 121212_465465_5456456_321513_21231_5341313..long list of number... into a very short number like HUFG545? 

then we just build the encoding system at the client & the system just take the encoded param from url & decode into the param strings.

If we can have an encoding system like that then it could be a better choice than storing params in DB?

On Friday, June 6, 2014 7:29:51 PM UTC+10, Thomas Broyer wrote:


On Friday, June 6, 2014 6:16:23 AM UTC+2, Tom wrote:
we need a lot of parameter for our gwt app for handling the history, if the url length is limited then the GWT history function also got limited, 

Be careful not to confuse "state" and "history": if you have that many parameters, I suppose that you're storing not only the current state of the "screen" but also the steps that led to there (e.g. which was the previous screen so there can be a "return to X" button). IMO, you shouldn't store those in the URL but just keep them in memory in your app, and choose a default behavior (choose a default for the "return to X" button, or not displaying that button at all) when you load the URL "fresh".
You could possibly store some state in cookies or localStorage, but then you run the risk that this state is not in sync with the URL that's being loaded, and will have to cope with it.
 
can we have other solution like storing the url parameter in Database?

Hey you can always send all the parameters to your server to get a "short URL" (store data in DB and get an identifier in exchange, and use that identifier in the URL), but that also means you'll need to ask the server for the parameters corresponding to the ID form the URL, and decide on when to "expire" that data to free some DB/disk space on the server.

I don't know your application, but I think if you have that many parameters, then you have a design issue to begin with.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment