Jump to content

Preloading mysql results


joquius

Recommended Posts

I don't usually ask questions but this is kind of a "wondering".

I have a script which loads different pages and remembers the history of the loaded pages by using cookies in the form of tabs. Now at the moment this script saves only the link to each page and each page has to reload itself again (each page contains data from a DB) which is not too fast and makes the tabs a bit untabish. Now what I'm thinking is about preloading the $result for each window query in the php, and then transferring those to javascript, and then playing around with the windows in javascript.

What do you think? On the one hand I don't know if it's good to preload about 6 queries with about 20 rows each (about 1k per row)

Any ideas or advice from someone with a lot of background in coding?

Thanks in advance for any feedback.
Link to comment
Share on other sites

well there is always storing the results as sessions but for all intents and purposes that probably just as slow from the user's POV i think. I think JSing it would probably be your best solution. I mean, 20 rows at 1k * 6 is 120k. that's not really a whole lot of waiting even on dialup speed. I think it would be better for the one time wait than having your site be slow overall, right?
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.