70
rated 0 times
[
72]
[
2]
/ answers: 1 / hits: 33080
/ 11 Years ago, wed, june 5, 2013, 12:00:00
I have a php include which takes awhile to load because PHP has to fetch a lot of data. I don't want to slow the whole webpage loading waiting for this include so how can I load this one include with ajax? I don't want the ajax to be triggered by a button click I just want it to load up the include as the page is loading so that if you look at my example below 'Some more html content' would be displayed whilst the inlude.php is still loading in.
<html>
<head>
</head>
<body>
Some html content
<script>
Ajax load 'include.php';
</script>
Some more html content
</body>
</html>
More From » php