-
AuthorPosts
-
cgc0202 Friend
cgc0202
- Join date:
- August 2007
- Posts:
- 2244
- Downloads:
- 0
- Uploads:
- 3
- Thanks:
- 206
- Thanked:
- 262 times in 1 posts
March 18, 2009 at 3:28 am #139281The issue of site optimization has been raised here quite a few times, while generic suggestions, more specific examples have not really been provided.
The more easy ones of course are obvious, like optimizing your images, and will not be the focus of this thread. Instead, it will be solely on placement of Javascripts. There will be no attempt to learn how to write javascripts nor understand them. Instead, it will focus mainly on the placement of javascripts in a file to speed up page presentation.
I read articles from Yahoo, and also from Google that placing the Javascripts at the bottom of the file — rather than at the top or in the Body of the file — would speed page upload. Studies suggest that placement of javascripts at the bottom of the file would speed up a more orderly presentation of the page.
Question 1: From a perspective of the average non-technical person, does this mean simply placing some or all the javascripts at the bottom, like this:
<html><head>
<title></title>
(Header)
(Body)
(Footer)
javascript 1
javascript 2
javascript 3
etc.
etc.
etc.
</body>
</html>where (Header), (Body) and (Footer) represent the scripts and tags that comprise and define the various major sections of the index.php file.
Question 2: If the above placement of javascripts is not correct, how should it be done?
Question 3: If the above placement of javascripts is correct Is this applicable to all javascripts or there are some that must be retained where they are currently found in the index.php because they are critical in the skeletal layout of the page?
Question 3b: IIf some of the javascripts must be kept where they should be, what javascripts must be kept in place from the examples cited below?
What I did therefore was isolate what I found to be javascripts in the Teline II index.php only to serve as an example. There are more jasvascripts in the various directories but they were not cited here.
Moreover, since I do not have any scripting background, what I would like to do is ask some question that perhaps others with more scripting background and/or have experience in site optimization might be able to answer.
I will present the javascripts below separately because I have specific questions for each group. More specifically, they will be referreed to here as those from Teline II index.php (templates=> ja_teline_ii => index.php):
Java scripts set #1: found near the top of the <head>
Java scripts set#2: found near the bottom of the <head>
Java scripts set#2 from Right Columnto rewrite the layout with respect to Question 1:
<html><head>
<title></title>
(Header)
(Body)
(Footer)
Java scripts set #1: found near the top of the <head>
Java scripts set#2: found near the bottom of the <head>
Java scripts set#2 from Right Column
</body>
</html>Some non-javascripts are included to help locate these scripts, as well as provide some context, as to what they might be for. Note that while the example is about Teline II, it should apply to all site optimizations as it pertain to managing and placements javascripts.
I hope those with scripting background help us resolve this issue, or at least provide more information. Thanks.
Cornelio
cgc0202 Friendcgc0202
- Join date:
- August 2007
- Posts:
- 2244
- Downloads:
- 0
- Uploads:
- 3
- Thanks:
- 206
- Thanked:
- 262 times in 1 posts
March 18, 2009 at 3:35 am #296577The javascripts and some location tags, non-javascripts are included to identify and situate the
Java scripts set #1: found near the top of the (head) tag
<script language=”javascript” type=”text/javascript” src=”<?php echo $tmpTools->templateurl(); ?>/js/ja.script.js”></script>
<script type=”text/javascript”>
//<!]>
</script>
<script language=”javascript” type=”text/javascript” src=”<?php echo $tmpTools->templateurl(); ?>/highslide/highslide-full.packed.js”></script><!– Menu head –>
<script language=”javascript” type=”text/javascript” src=”<?php echo $tmpTools->templateurl(); ?>/highslide/highslide-full.packed.js”></script><!– Menu head –>
I would be very grateful for any information that would shed light with respect to the questions asked in the original thread.
Thanks.
Cornelio
cgc0202 Friendcgc0202
- Join date:
- August 2007
- Posts:
- 2244
- Downloads:
- 0
- Uploads:
- 3
- Thanks:
- 206
- Thanked:
- 262 times in 1 posts
March 18, 2009 at 4:09 am #296581There are other scripts and tags, found in the default index.php that separate the Java scripts set#1: found near the bottom of the (head) tag shown above from the
Java scripts set#2: found near the bottom of the (head) tag (shown below):
set#2a:
<?php if ($tmpTools->isIE6()) { ?>
<!–>
<script type=”text/javascript”>
var siteurl = ‘<?php echo $tmpTools->baseurl();?>’;
</script>
<!–>
<?php } ?>set#2:a set#2b:
<script type=”text/javascript”>
hs.graphicsDir = ‘<?php echo $tmpTools->templateurl(); ?>/highslide/graphics/’;
hs.showCredits = true; // you can set this to false if you want
hs.creditsText = ‘Powered by JA Highslide’;
hs.creditsHref = ‘http://joomlart.com/’;
hs.creditsTitle =’Go to the Highslide JA homepage’;
</script>I would be very grateful for any information that would shed light with respect to the questions asked in the original thread.
I separated these javascripts set2 from the first set (set#2a:) because I thought that the first javascript (set#2a:) in this set was written specifically to detect the browser used in the computer of the site visitor. My own hunch is that it should be kept at the within the head tag??? Or, can this javascripts set#2a: be placed also near the bottom of the page???
Javascript set#2b: if I am not mistaken is the script that define Highslide module found in position user6, as default position. Since the Highslide module is mostly invisible (4th position in the Tab module), it is a good candidate for placement near the bottom of the index.php file.
A related question: If the Highslide os “unpublished” and not used at all in the website, does the presence of the Highslide javascript have any impact on page optimization? I guess, a naive way of asking this is that won’t the system go bonkers looking: “Where’s the Highslide?” “Where’s tthe Highslide?” before giving up to performother chores.???
The analogy is similar, although a non-javascipt issue to a URL: written simply as
rather than correct:
in the first without the slash, the server must ascertain whether politics is a file or a directory. The slash (“/”) shown in the second, identifies “politics” as directory, so that the system will treat as such, and move on.
This is also another off tangent inquiry (non-javascripts) but just as important
- CSS tags that are not defined
- use of icons in CSS specification that are actually missing
In both cases, the system must attempt to find them.; using a more anthropomorphic analogy, it will be a waste of time for helper bots looking for them, only to realize that they are missing???
Thanks.
Cornelio
cgc0202 Friendcgc0202
- Join date:
- August 2007
- Posts:
- 2244
- Downloads:
- 0
- Uploads:
- 3
- Thanks:
- 206
- Thanked:
- 262 times in 1 posts
March 18, 2009 at 4:23 am #296586Note: there are non-java scripts are included in
Optimization and Java scripts set#3 from Right Column
to relate the function of the javascripts in relation to its function to define the tab position (user 6 and user6) modules:
<!– BEGIN: COLUMNS –>
<div id=”ja-colwrap”><?php if ($ja_masscol) { ?>
<!– BEGIN: MASSCOL –>
<div id=”ja-colmass” class=”clearfix”>
<div class=”ja-innerpad”><jdoc:include type=”modules” name=”user5″ style=”xhtml” />
<?php if ($this->countModules(‘user6’)) : ?>
<script language=”javascript” type=”text/javascript” src=”<?php echo $tmpTools->templateurl(); ?>/mootabs/mootabs1.2.js”></script>
<script type=”text/javascript”>
window.addEvent(‘load’, initmootabs);
function initmootabs() {
myTabs1 = new jamootabs(‘ja-tabs’, {
<?php echo $ja_mootabs_options; ?>
});
}
</script>
<div id=”ja-tabswrap”>
<div id=”ja-tabs” class=”clearfix”>
<div class=”ja-tab-panels”>
<jdoc:include type=”modules” name=”user6″ style=”xhtml” />
</div>
</div>
</div>
<?php endif; ?><jdoc:include type=”modules” name=”user7″ style=”xhtml” />
</div>
<!– Orig END: MASSCOL –><?php } ?>
<!– BEGIN: LEFT & RIGHT COLUMNS –>
My hunch is that javascript should be kept where it is located because it is integral in defining the position user5 and user6 positions???? Clarification please.
From my observations, this is the slowest loading portion of the Home page. Furthermore, from what I read in the Teline II, many people are experience problems with the modules placed in the position user6.
There are problems with ghost modules, i.e., they do not appear even if they are properly setup? Spacing problems, etc. From a personal experience, in the case of the “Latest” and “Popular” modules while they appear in the Homepage and other sections and categories, sometimes they do not appear in some pages, even if the setting is “ALL”.
It appears that the system recognizes that there is something in user6 position because space is alloted (when there is no module, it should collapse). If anyone knows what is causing the problem, I would appreciate it.
Cornelio
1 user says Thank You to cgc0202 for this useful post
joeflynn Friendjoeflynn
- Join date:
- February 2009
- Posts:
- 91
- Downloads:
- 0
- Uploads:
- 1
- Thanks:
- 59
- Thanked:
- 3 times in 1 posts
August 15, 2009 at 11:48 pm #314422Cornelio, I don’t know enough about coding to make an intelligent comment to your questions. But as I get closer to getting my sites to release status, I am noticing the speed issue…and appreciate seeing your threads as attempts to get to the real issues.
So, thanks.
cgc0202 Friendcgc0202
- Join date:
- August 2007
- Posts:
- 2244
- Downloads:
- 0
- Uploads:
- 3
- Thanks:
- 206
- Thanked:
- 262 times in 1 posts
August 16, 2009 at 7:46 am #314434<em>@joeflynn 140885 wrote:</em><blockquote>Cornelio, I don’t know enough about coding to make an intelligent comment to your questions. But as I get closer to getting my sites to release status, I am noticing the speed issue…and appreciate seeing your threads as attempts to get to the real issues.
So, thanks.</blockquote>
HI joeflynn,
The issue of optimization and Joomla has been visited in the forum numerous times. The impact of javascripts is just one of them. The thumb rule is to place javascripts at the end. However, like you, I do not know enough about scripting to understand how location-specific javascripts should be dealt with.
This thread was posted mainly for Arvind (drarvindc) — who is now one of the Moderators == to respond to; but neveer got the response. There are other posts on relted to optimizations here (outside of the Teline II forum). However, as far as I know, the questions I asked were not answered either in those threads.
A big part of the problem is the modular nature of Joomla, and there are even more modules in Joomla 1.5.x, more so if you add the template that is Teline II. The reason is rather simple — the more door and roomls and cabinets you have to open to get to your files and compile to creat a page of a website, then the slower it would b to load.
If you are used to wepages like those of Yahoo, or Google. you will notice how fast they load, you would notice that they load much much faster compared to a Joomla.page.
Here in the US and many Western countries, high speed internet is more prevalent but still not universal, so the issue of optimization is not of much interest to many people here. However, back home in the Philippines, more people have low speed internet. Sometimes because it is so slow, it “times out”.
Cornelio
15,946 pts before this
joeflynn Friendjoeflynn
- Join date:
- February 2009
- Posts:
- 91
- Downloads:
- 0
- Uploads:
- 1
- Thanks:
- 59
- Thanked:
- 3 times in 1 posts
August 16, 2009 at 8:21 am #314435Timing out would be a problem…
The problem I would have as a user of my own sites is that the delay before anything happens is just short of the delay for getting a “Server not responding” page. If only the format, or the text or some dancing lights or anything to indicate that a page is being served.
Everyone knows that it is OK to have placeholders for pictures to load last, so that optimization is not the issue.
I think that I will try the javascript and csscompressors that were recommended first, and see if there is an improvement:
http://javascriptcompressor.com/
http://www.cssoptimiser.com/index.phpIn absence of a wiki, perhaps a single Optimization Thread, with only things that work, or things to try should be created…clips from other threads perhaps…but no complaining or off-topic remarks…
cgc0202 Friendcgc0202
- Join date:
- August 2007
- Posts:
- 2244
- Downloads:
- 0
- Uploads:
- 3
- Thanks:
- 206
- Thanked:
- 262 times in 1 posts
August 16, 2009 at 4:39 pm #314448joeflynn,
There are a number of good methods of optimization discussions here. I just do not have the tools to do it. Arviind provided some suggestions in some threads
There are more suggestions from Yahoo studies on optimizations. Do a search you may find them.
Cornelio
1 user says Thank You to cgc0202 for this useful post
joeflynn Friendjoeflynn
- Join date:
- February 2009
- Posts:
- 91
- Downloads:
- 0
- Uploads:
- 1
- Thanks:
- 59
- Thanked:
- 3 times in 1 posts
August 17, 2009 at 7:32 am #314478<em>@cgc0202 140923 wrote:</em><blockquote>joeflynn,
There are a number of good methods of optimization discussions here. I just do not have the tools to do it. Arviind provided some suggestions in some threads
There are more suggestions from Yahoo studies on optimizations. Do a search you may find them.
Cornelio</blockquote>
Yes, you are right. I just paid attention to Dr. Arvlind’s post and then went to his site. Wow~! It is the perfect tutorial, complete with the basic ideas and references:
How to Speed Up – Optimize Joomla Performance?
I’m going to wait until I am through and just use their services.My point though, is that searching through threads and pages of discussions is so 90’s. Having the “Best Answer” solution is nice, but a small bandage on a large pig. And having so many stickies starts to be a solution, then gets overwhelming when there are too many. Pointing people to a wiki might be a solution if it were made complete and up to date.
Anyway, thanks many times to all.
cgc0202 Friendcgc0202
- Join date:
- August 2007
- Posts:
- 2244
- Downloads:
- 0
- Uploads:
- 3
- Thanks:
- 206
- Thanked:
- 262 times in 1 posts
August 17, 2009 at 7:31 pm #314557joeflynn,
and may not work because many threads may not have been solved. That was why I was an advocate of better manuals and tutorials. If not, for people who had experienced it to point to the correct threads.
My advocacy to reform the Credit system, which should encourage others helping each other seems to be falling on deaf ears though.
Cornelio
joeflynn Friendjoeflynn
- Join date:
- February 2009
- Posts:
- 91
- Downloads:
- 0
- Uploads:
- 1
- Thanks:
- 59
- Thanked:
- 3 times in 1 posts
August 17, 2009 at 8:16 pm #314570<em>@cgc0202 141059 wrote:</em><blockquote>joeflynn,
and may not work because many threads may not have been solved. That was why I was an advocate of better manuals and tutorials. If not, for people who had experienced it to point to the correct threads.
Cornelio</blockquote>
Well, you won’t find me arguing against better manuals and tutorials~!~! I was thinking of changing over to a different group just because of the quality of their video manuals…I was thinking of how much time I would have saved if I had something like that in my early days.I don’t know if it has been implemented before, but I think that a button that allows a correct statement in a forum to be quoted and sent to a wiki, with meta words. At least then the workable data gets somewhere besides in a huge and unsearchable forum.
Arvind Chauhan ModeratorArvind Chauhan
- Join date:
- September 2014
- Posts:
- 3835
- Downloads:
- 74
- Uploads:
- 92
- Thanks:
- 1240
- Thanked:
- 1334 times in 848 posts
August 18, 2009 at 1:13 pm #3146294 offtopic posts (of mine and Cornelio’s) moved to appropriate forum at http://www.joomlart.com/forums/topic/the-need-to-reform-the-credit-system/.
Arvind
sunrise Friendsunrise
- Join date:
- February 2007
- Posts:
- 920
- Downloads:
- 0
- Uploads:
- 5
- Thanks:
- 103
- Thanked:
- 166 times in 114 posts
August 20, 2009 at 3:34 pm #314907<em>@cgc0202 141059 wrote:</em><blockquote>
My advocacy to reform the Credit system, which should encourage others helping each other seems to be falling on deaf ears though.
Cornelio</blockquote>
I don’t think it is “deaf” ears as much as “tired” ears. You have a point, and it is well presented there, but not all agree, and not all feel that any change is needed. That does not make them deaf. It just means they don’t have the same opinion you do. Nothing wrong with that, I think. Right? -
AuthorPosts
This topic contains 13 replies, has 4 voices, and was last updated by sunrise 15 years, 4 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum