I am engaged in website optimization in order to improve the overall loading time of web pages. I use so many methods recommended by the Yahoo Developer Network "Best Practices to Speed Up Your Website . "
Now statistics show that we have many visitors who first access the website through:
separate search engine page HTTP error handlers - that is, our custom "404 Not Found" page other separate offline pages
Please note that these so-called "offline pages" exist independently of the template system, which is responsible for the layout and structure of the pages from the site itself. They have their own stylesheet and scripts (and therefore exist independently of the CSS and JS file system templates).
These page types are now more intermediate pages than content pages. A good example of their common purpose is the landing page link . I thought it would be nice to use a technique such as post-onload to "smooth out" the user's cache, ready for the next step (which will almost always be part of the main template system).
script from Steve Sounders:
post-onload.php :
<script>
function doOnload() {
setTimeout("downloadComponents()", 1000);
}
window.onload = doOnload;
function downloadComponents() {
downloadCSS("http://stevesouders.com/hpws/testsm.css?t=1388138263");
downloadJS("http://stevesouders.com/hpws/testsma.js?t=1388138263");
downloadJS("http://stevesouders.com/hpws/testsmb.js?t=1388138263");
downloadJS("http://stevesouders.com/hpws/testsmc.js?t=1388138263");
}
function downloadCSS(url) {
var elem = document.createElement("link");
elem.rel = "stylesheet";
elem.type = "text/css";
elem.href = url;
document.body.appendChild(elem);
}
function downloadJS(url) {
var elem = document.createElement("script");
elem.src = url;
document.body.appendChild(elem);
}
</script>
I would like to know the following:
, , downloadCSS(url) downloadJS(url), __without__, -?
, downloadCSS(url)/downloadJS(url), - CSS/JS,
, HTML5 , @prefetch ). , , post-onload, .
, , , !
!