Jump to content

Archived

This topic is now archived and is closed to further replies.

joquius

Preloading mysql results

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.

Share this post


Link to post
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?

Share this post


Link to post
Share on other sites
suppose so, at any rate I'm looking for ways to move loops which output html from php to javascript to reduce the strain on my server and the bandwidth in use.

Share this post


Link to post
Share on other sites

×

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.