JonasLAX Posted June 12, 2009 Share Posted June 12, 2009 Hi everybody, I am fighting with the statelessness of the web once again. I roughly have the following situation: I have a search-engine like website which has a list with results in the left column and then in the right column information on one specific item from that list. If I enter element1 as a search term I will get a certain resultlist based on element1 in the left column and the content for element1 in the right column with the url of the page being url/element1. If I select the next element from the resultlist, the URL changes to url/element2 with the resultlist being loaded from the cache and the right column being filled with the element2 content. Now, I would like to deeplink to url/element1 directly and in that case open the resultlist of a query of only element1 in the left column and the actual element1 in the right column (instead of using the cache for the resultlist in the left column which can be different as when we go through the resultlist instead of deeplinks). Therefore, if I have a query which outputs: url/element1 url/element2 and select the second link I would like the right column to be filled with the content of element2 without changing the left column. If I directly enter url/element2 into the address bar of the browser however, I would like the system to create a new page with the element2-content in the right column AND a new resultlist of the simple query 'element2' in the left column. Unfortunately, my resultlist to the left is not a form so I can not simply set a $POST parameter and for SEO-reasons I would hate having to use a $GET parameter in the url. To summarize, I believe I need a clean way to differentiate between an internal link request and an external link request without using a $POST paramter. Any ideas on a clean solution to this dilemma? Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/161911-implementing-state-behaviour-in-stateless-world/ Share on other sites More sharing options...
DarkSuperHero Posted June 12, 2009 Share Posted June 12, 2009 If i understand correctly look into SWFAddress (comes in AJAX Flavor)....it uses JS and html anchor links to create a deep-linked page... a url like this: http://www.asual.com/swfaddress/samples/ajax/#/history/ get it here: http://www.asual.com/swfaddress/ Quote Link to comment https://forums.phpfreaks.com/topic/161911-implementing-state-behaviour-in-stateless-world/#findComment-854284 Share on other sites More sharing options...
Daniel0 Posted June 12, 2009 Share Posted June 12, 2009 Can't you just store it in sessions? Incidentally, I once wrote a tutorial named almost like this topic. Quote Link to comment https://forums.phpfreaks.com/topic/161911-implementing-state-behaviour-in-stateless-world/#findComment-854288 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.