255047 cache javascript
N/A
Dibayar saat pengiriman
Hello,
I don't know if this is possible, but I will give it a try.
I have a website where the frontpage is cached.
Every hour the data will be refreshed by a cronjob.
Due to ad new features I asked someone to also put weblinks on the frontpage. So it is a .php file with a query that selects 3 records from the database and return the values. A part of the script looks like:
$x = list_of_categories_for_item('l',0,$a[c],'<br />',0); $a = array_merge((array)$a,(array)$x);
$a[site_url] = $s[site_url];
$pocet++;
$aa["url$pocet"] = $a[url];
$aa["title$pocet"] = $a[title];
$aa["category$pocet"] = $a[categories_names];
$aa["image$pocet"] = $a[image_1];
$aa["n$pocet"] = $a[n];
get_detail_page_url('l',$a[n],$a[rewrite_url],$a[category],1);
}
$b = stripslashes(parse_part('[url removed, login to view]',$aa));
$lines = explode("\n",$b);
foreach ($lines as $k=>$v)
{ $v = unreplace_once_html(trim($v));
$v = ereg_replace('"','\\"',$v);
$complete .= "[url removed, login to view](\"$v\");\n";
}
echo $complete;
This file is included with javascriptcode:
<script language="javascript" type="text/javascript"
src="[url removed, login to view]"></script>
What do I want?
I want the data to cache to a textfile, and that i can include the textfile on the frontpage. So it does not everytime load the data.
Or does this not make sense and is it not a good idea tio cache this data or does it not effect speed on frontpage?
ID Proyek: #2001308