سؤال

I have 2 search-pages and 1 result-page. The result-list on the result-page is a list of URLs.

The URLs are dependent of the search-page, so if the user comes from search-page1 he gets a different URL to the user who comes from search-page2.

So on the result-page I have to know from which search-page the user comes. First I tried it with UrlRefferer, but if the result-list has too many results, I use paging and if the user clicks on the second result-list I loose the UrlReferrer...

What is the best way to do this? To use Session or better use a query parameter in the URL?

هل كانت مفيدة؟

المحلول

If I understood your question, this is only for a single request. So better you can pass as a request parameter. Session will unnecessary hold the value for the whole pages which is not appropriate. And unless you update the value in session parameter, it will keep hold the old value only.

Is it possible for you to hold the value in a script variable?

نصائح أخرى

IMHO session is a simpler solution, so you doesn't have to set query parameters every time user change page.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top