Click here to Skip to main content
15,867,885 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Lets say there is view that will show information based on parameters(data filtering),
lets called it a FilterClass which includes several Fields such as

List<string> Names
List<string> Ids
List<string> Nationality

and many others, since results could bee a lot there is paging involved, 10 records per page.
Paging is done by using $.get, and used to send parameters, initially the filter had just a few small fields, no lists, once lists were added to the class, things changed since now filters could be too many.

What alternatives could be used in order to avoid session, cookies, cache in MVC applications,
when information required to pass could be extremley big reaching the url max size (maxUrlLength),
which could be increased but there is no way in the system to measure how big the lists could be.

Alternatives solutions I have heard, been told is using tempdata, session, cache, others,
but I am trying to avoid any kind of persistence.
Posted
Updated 13-Nov-13 10:17am
v2
Comments
Sergey Alexandrovich Kryukov 13-Nov-13 15:56pm    
I could imagine avoiding of cookies (this is when you just don't use them :-) and control caching, but what could it possibly mean, "to avoid session"?
And why avoiding them? (Does it mean avoiding station states? I'm asking because it looks like you are aware of the stateless nature of HTTT...)
—SA
Eduardo Fonseca 13-Nov-13 16:01pm    
I basically meant avoid storing information, which one could do by passing parameters to the action method, but there is that limitation of too many parameters that url exceeds its maximum allowed size
Sergey Alexandrovich Kryukov 13-Nov-13 16:06pm    
You need to explain more (see the update to my comment above, and my answer). As to the the size of URL, it looks just nonsense: the mechanism for passing a good volume of data is the HTTP parameters (typically send without much limitations on volume via "POST" HTTP method), not via URL. It's not just the length of URL, it's exposing all the request data, performance, the hassles of parsing, etc. Who would do such things?
—SA
Eduardo Fonseca 13-Nov-13 16:45pm    
I updated the descriptions, you are right on using post, but isn't true then I would not be able to just change url parameters for applying a different filter, meaning I would have an action dependent on a flow, which is also what I was trying to avoid.
Sergey Alexandrovich Kryukov 13-Nov-13 16:52pm    
You can use the URL parameters, but it would be, at the very least, utterly impractical.
—SA

1 solution

As to the Web cache, this is explained in detail in this article: http://www.mnot.net/cache_docs/[^].

Other parts of the question does not seem to make much sense to me — please see my comment to the question. Also, it's not clear how your question can be related to "filtering fields", passing them, "URL size limitation" and other issues mentioned. If you explain those concerns, it may become a matter of discussion or even a chance to get more help.

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900