I have php page that takes approx. 30 seconds to load!
This page returns paginating data, 25 row per page.
I am using correct query like "SELECT field1, field2... FROM table1 where..."
My page has scripts tag like: <script>js_function</script>
Now I have 25 rows per page, each row has 2 scripts like: <script>js_function</script>, so total = 50 script tag.
Now functions inside the tags are accessing the mysql database and fetching data from there using the AJAX.
Each row has 50 html elements like buttons, text fields, drop down list that contains elements loaded from DB, <divs>..
So having 25 rows, means to load 25*50 = 1250 element per page!! Does that slow down the page?
I tried the stored procedure in MYSQL, but did not improve any second!
The page DOES NOT contain any photos, even no long text, just 3 columns for NAME, MOBILE and DEPARTMENT and user can change the name, mobile or department.
I have other pages that are loaded in 3 seconds only! But they do not have that much of html elements!
Actually scripts should be integrated inside the PHP code, I can't take them outside.
I am using "Echo" of the script inside the PHP code, like: echo "<script>js_function</script>";
Please advise how can I make the page fast as 5 seconds? Without caching the page on the client??