Joomla.it Forum
Joomla! 2.5 (versione con supporto terminato) => Joomla! 1.6/1.7/2.5 => : Alle23aprlile 27 Jan 2012, 15:35:03
-
Buon giorno.
Il problema chee ho e che da tempo sto cercando di risolvere, è il posizionammento nell'HEAD di prima avere ifoglio di stile css, e poi i javascrip.
E' buona norma inserire i fogli di stile nella sezione HEAD del documento, prima dei javascrip che vengono tenuti per ultimi. Il motivo è che i CSS sono fondamentali per l'aspetto del sito, mentre maggior parte delle funzioni JAVASCRIPT non lo sono. Inoltre , le libreriè JAVASCRIPT devono essere caricate completamente prima che il brosware prosegua il suo lavoro e alcune sono così grandi che tenerle per ultime, consentirà di caricare il sito più rapidamente. ( Tratto da WebDesigner Magazine - OTTIMIZZARE E VELOCIZZARE UN SITO pag. 22 punto 4 )
<head>
<meta http-equiv="X-UA-Compatible" content="IE=9" />
<base href="http://localhost/business/" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="generator" content="Joomla! - Open Source Content Management" />
<title>Home</title>
<link href="/business/index.php?format=feed&type=rss" rel="alternate" type="application/rss+xml" title="RSS 2.0" />
<link href="/business/index.php?format=feed&type=atom" rel="alternate" type="application/atom+xml" title="Atom 1.0" />
<link href="http://localhost/business/templates/gk_finance_business/images/favicon.ico" rel="shortcut icon" type="image/vnd.microsoft.icon" />
<link href="http://localhost/business/index.php/component/search/?format=opensearch" rel="search" title="Vai Italservice" type="application/opensearchdescription+xml" />
<link rel="stylesheet" href="/business/media/system/css/modal.css" type="text/css" />
<link rel="stylesheet" href="/business/templates/gk_finance_business/css/k2.css" type="text/css" />
<link rel="stylesheet" href="http://localhost/business/templates/gk_finance_business/css/menu.gkmenu.css" type="text/css" />
<link rel="stylesheet" href="http://localhost/business/templates/gk_finance_business/css/reset/meyer.css" type="text/css" />
<link rel="stylesheet" href="http://localhost/business/templates/gk_finance_business/css/layout.css" type="text/css" />
<link rel="stylesheet" href="http://localhost/business/templates/gk_finance_business/css/joomla.css" type="text/css" />
<link rel="stylesheet" href="http://localhost/business/templates/gk_finance_business/css/template.css" type="text/css" />
<link rel="stylesheet" href="http://localhost/business/templates/gk_finance_business/css/menu.css" type="text/css" />
<link rel="stylesheet" href="http://localhost/business/templates/gk_finance_business/css/gk.stuff.css" type="text/css" />
<link rel="stylesheet" href="http://localhost/business/templates/gk_finance_business/css/typography.style1.css" type="text/css" />
<link rel="stylesheet" href="http://localhost/business/templates/gk_finance_business/css/typography.iconset.1.css" type="text/css" />
<link rel="stylesheet" href="http://localhost/business/templates/gk_finance_business/css/typography.iconset.2.css" type="text/css" />
<link rel="stylesheet" href="http://localhost/business/templates/gk_finance_business/css/typography.iconset.3.css" type="text/css" />
<link rel="stylesheet" href="http://localhost/business/templates/gk_finance_business/css/style1.css" type="text/css" />
<link rel="stylesheet" href="http://localhost/business/modules/mod_news_pro_gk4/interface/css/style.css" type="text/css" />
<link rel="stylesheet" href="http://localhost/business/modules/mod_news_pro_gk4/interface/css/style.portal.mode.3.css" type="text/css" />
<link rel="stylesheet" href="http://localhost/business/modules/mod_news_pro_gk4/interface/css/style.portal.mode.2.css" type="text/css" />
<link rel="stylesheet" href="http://localhost/business/modules/mod_news_pro_gk4/interface/css/style.portal.mode.1.css" type="text/css" />
<link rel="stylesheet" href="http://localhost/business/modules/mod_image_show_gk4/styles/gk_financial_business/style.css" type="text/css" />
<script src="/business/media/system/js/mootools-core.js" type="text/javascript"></script>
<script src="/business/media/system/js/core.js" type="text/javascript"></script>
<script src="/business/media/system/js/mootools-more.js" type="text/javascript"></script>
<script src="/business/media/system/js/modal.js" type="text/javascript"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js" type="text/javascript"></script>
<script src="/business/components/com_k2/js/k2.js" type="text/javascript"></script>
<script src="/business/media/system/js/caption.js" type="text/javascript"></script>
<script src="http://localhost/business/templates/gk_finance_business/js/menu.gkmenu.js" type="text/javascript"></script>
<script src="http://localhost/business/templates/gk_finance_business/js/gk.scripts.js" type="text/javascript"></script>
<script src="/business/media/system/js/validate.js" type="text/javascript"></script>
<script src="http://localhost/business/modules/mod_news_pro_gk4/interface/scripts/engine.js" type="text/javascript"></script>
<script src="http://localhost/business/modules/mod_news_pro_gk4/interface/scripts/engine.portal.mode.2.js" type="t" defer="defer" async="async"></script>
<script src="http://localhost/business/modules/mod_image_show_gk4/styles/gk_financial_business/engine.js" type="text/javascript"></script>
<script type="text/javascript">
window.addEvent('domready', function() {
SqueezeBox.initialize({});
SqueezeBox.assign($$('a.modal'), {
parse: 'rel'
});
});
var K2SitePath = '/business/';
window.addEvent('load', function() {
new JCaption('img.caption');
});
$GKMenu = { height:true, width:true, duration: 250 };
$GK_TMPL_URL = "http://localhost/business/templates/gk_finance_business";
function keepAlive() { var myAjax = new Request({method: "get", url: "index.php"}).send();} window.addEvent("domready", function(){ keepAlive.periodical(840000); });
window.addEvent('domready', function() {
$$('.hasTip').each(function(el) {
var title = el.get('title');
if (title) {
var parts = title.split('::', 2);
el.store('tip:title', parts[0]);
el.store('tip:text', parts[1]);
}
});
var JTooltips = new Tips($$('.hasTip'), { maxTitleChars: 50, fixed: false});
});
try {$Gavick;}catch(e){$Gavick = {};};$Gavick["gkIs-gk-is-118"] = { "anim_speed": 500, "anim_interval": 5000, "autoanim": 1, "anim_type": "opacity","slide_links": 1 };
</script>
</head>
Qualche d'uno può darmi una dritta?
Grazie.
Cordiali Saluti.
Alle
-
Ciao Alle23aprile,
Ho l'impressione che si tratta di un template commerciale, giusto?
Se così sai cosa dice il regolamento... :-X
-
Ciao.
Quello del codice riportato, è il tipo di risultato che vglio avere.
Leggendo un articolo di WebDesigner magazione, ho letto che per essere un sito ottimizzato, priva vanno i CSS e poi i Javascript, ma se vediamo il template standard di Joomla 2.5 ci sono i fogli di stile poi dai javascript, poi altri fogli di stile e poi altri javascrip.
Insomma è tutto un miscuglio. ho provato andare a vedere il file del core di joomla, head.php ma non riesco a mettere prima i fogli di stile e poi i javascript.
Non è una questione di template commerciale, è questione del file head.php del core di joomla.
E' Possibile fare un Override del file head.php e in che modo posso impostarlo.
Ho visto che vari freamWork hanno risolto il problema, ma non riesco a capire come hanno fatto.
Saluti.
Alle.