http - Is it preferable to preserve web application state with JSON in URL? -
You can preserve the web application status with the JSON in the URL like this:
http: // host /? State = [{id: 1, selected = true}, {id: 2, selected = false}]
Is this better?
There is an inspiration to do something like this if the user has the Web application status to be brought back to the user next time on the web application status. P> It is possible, but I think this is a bad practice:
- You are exposing a lot of technical details about your web app to end users
- Are you sure you are using secure JSON parsing?
- You are forced to stop url character encoding sooner or later
- Your URL is not very descriptive (see)
My Advice: Create an ID for the state
which is for the JSON stored in your database (Your URL's http: // host /? State = 123
with 123
pointing to any kind of database record (this makes URL very accessible, but I still have to So that it is better because the other points) is.
Comments
Post a Comment