Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing Data Thru Pages 1

Status
Not open for further replies.

Tarianna

Programmer
Sep 4, 2010
16
US
I'm new to html programming, perl and the like...and need advice and could use a few insights on how to tackle this problem.

I'm writing the paging part of a simple search web application where a query returned more results than it can display. I'm using perl, cgi, html templates and mysql.

I have the algorithm how to handle the paging part but have a problem of sending an array full of queried data from page to page as I show parts of it as determined by the user.

The data is far too large imho to pass it as part of the URL string (GET option) and here is where I'm stuck.

Should I pass this data thru a Post? Would that have an impact for network traffic? or perhaps write it to a cookie or temp file on the client's computer or maybe write it to a temp db table? Or should I just do another database hit and do another query? (I was hoping not to do that) If the user should go crazy paging back n forth, I'm afraid that ..that will have an impact on the existing production processes.

What is best recommended for the best performance? I thought a cookie would be cool to do but I'm reading that most ppl just put config information in there. (And not only that i've never given a cookie before and that kinda sounds fun! "lil boy, do you want a cookie? *manic laughter*")

Any advice what you'd do would be appreciated.
Thanks.
-t
 
Hi Tarianna,
I beleive database hit is the easiest and convinient way (unfortunately).

or you can track which pages user has visited using sessions and use javascript (history) to go back to those pages.



--------------------------------------------------------------------------
I never set a goal because u never know whats going to happen tommorow.
 
Thanks Spookie for verifying what I thought I shoudl do. Yes it's a LOT easier to do a database hit than it is to attempt to 'cache' the results. I was reading up on creating an external file and temporary SQL tables which are a maintenance nightmare in the long run.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top