# How does craigslist retain search query results?

**URL:** <https://www.ruby-forum.com/t/how-does-craigslist-retain-search-query-results/128062>\
**Category:** Rails\
**Created:** [February 4, 2008, 6:36pm UTC](https://www.ruby-forum.com/t/how-does-craigslist-retain-search-query-results/128062 "2008-02-04T18:36:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![liquidrails](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/a6a055/32.png) [@liquidrails](https://www.ruby-forum.com/u/liquidrails)\
**Post date:** [February 4, 2008, 6:36pm UTC](https://www.ruby-forum.com/t/how-does-craigslist-retain-search-query-results/128062/1 "2008-02-04T18:36:47Z")

</div>

When you search for a keyword on craigslist, a list of posts is  
returned. When you click on an individual post in that list, the full  
post is displayed. Then, when you press the back button on your  
browser, the results list is displayed again, without the server having  
to query again for the list of keywords. How can I get the server to  
remember search results without having to requery the database when the  
back button is pressed?

Thanks!

---

<div class="post-metadata">

**Author:** ![liquidrails](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/a6a055/32.png) [@liquidrails](https://www.ruby-forum.com/u/liquidrails)\
**Post date:** [February 5, 2008, 1:41am UTC](https://www.ruby-forum.com/t/how-does-craigslist-retain-search-query-results/128062/2 "2008-02-05T01:41:51Z")

</div>

That is not done by the server at all. That is completely a function  
of the client’s browser history.

In order for this to work properly the URL must be different so that a  
new history item is created. There are other ways of handling this as  
in DHTML History.

On Feb 4, 12:36 pm, Cheri R. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
