PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Thanks to Firebug I'm now seeing more stuff that's going on behind the screens of my websites. I noticed that my jquery.js.php file never gets cached. After copying the output to a plain text file called jquery.js, caching works and page loading speed dramatically increases.
<?php
// This is the jquery.js.php file.
header('content-type: application/x-javascript');
// I guess I need some kind of cache-control header over here.
// However, tried some things without success.
require '../config.php';
require SHARED_DOCROOT .'js/jquery/jquery.js';
?>
$(document).ready(function(){
// Animate message box
$('#message').slideDown('normal');
// More jquery here...
});
});