Search code examples
internet-explorergwtgwtp

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?


This is serious problem.

In GWT, making your url bookmarkable is important. Thus we may have a very long parameter in the url, but IE can only handle url length that is about 2000 characters or less.

So a url can work ok in Chrome but when ran under IE it got chopped off & thus will corrupt the parameter.

So, do you have any idea how to deal with it?


Solution

  • A situation like yours sounds like the result of poor design; you're using the wrong tool for the job. The URL is not meant as a place to store data, but rather as an identifier (or a locator) for that data.

    Try to store the parameters elsewhere. Where? That depends. On the server: in the session or in a database. On the client: in cookies or in localStorage. You mention "history" in the comments—if the IE you're targeting is version 10 or greater, you can even store state objects using the history API.