Skip to main content

Free Blogger Template Ajah

Free Blogger Template Ajah


Setting CSS Code and Javascript Code to Increase Loding Blog

Posted: 27 Mar 2010 09:43 AM PDT

css and javascript code to increase loading blogMany ways to increase loading blog. If in my previous post how to increase loding blog with external link css code, now how to increase loading blog with setting css code and JavaScript code.

First, see structure the blog template codes below. Generally, blog template codes as follows like this :


<b:skin><![CDATA[/*

CSS code

]]></b:skin>

<!-- head-->

<!-- body-->
<!-- html-->


Adding new code like Feature Content and auto readmore make the structure of template code changes


Example : You want to add Feature Content widget on your blog.

Featured Content usually consists of css code and JavaScript code. Placement css code from the tutorial itself refers placed on top

]]></b:skin>


and JavaScript code, are usually placed under the code

]]></b:skin> or above code

<!-- head-->


Featured Content itself is usually only appear on the main post and label post and will not appear on the single post. Structure html code of Feature Content usually like this :

<b:if cond='data:blog.pageType != &quot;item&quot;'>
<div id='feature-content'>
<b:section class='feature' id='feature' preferred='yes'>
<b:widget id='HTML30' locked='false' title='Feature Content='HTML'/>
</b:section>
</div>
</b:if>

* I use <b:if cond='data:blog.pageType != &quot;item&quot;'> code for Feature Content widget on my blogger template which have Feature Content. Other blog use <b:if cond='data:blog.pageType == &quot;index&quot;'> code for Feature Content.


When you click a single post, the Feature Content will be lost but if you look at the View Page Source, CSS and JavaScript code pf Feature Content is still seemingly, and it will remain readable by search engines as the existing code in your blog. Is not this a heavy impact for your blog??

Then how?? You have to do some to "hide" css and JavaScript code from the search engines.

1. css code
As i have written above, css code for the Feature Content is usually placed above

]]></b:skin>


Move that code under the code

]]></b:skin>

with the following structure like this:

<style type='text/css'>
<b:if cond='data:blog.pageType != &quot;item&quot;'>

Your CSS code here

</b:if>
</style>


2. JavaScript code

For JavaScript, make the code like this below :
<b:if cond='data:blog.pageType != &quot;item&quot;'>
<script src='URL-JAVASCRIPT-CODE' type='text/javascript'/>
</b:if>

Save.

Now, click on one of your blog posts and see the View Page Source. CSS and JavaScript code Feature Content are not appear on your blog and automatically, it will also reduce the weight of your blog that means increase loading your blog.

* Note red color
* Red color for CSS and JavaScript code it must same with html code of Feature Content


Example this trick for Auto readmore

<b:if cond='data:blog.pageType != &quot;item&quot;'>

JavaScript auto readmore code here

</b:if>

You can also use this step for other widget blog like code JavaScript for other widget like related post or other.


Note:
- Code <b:if cond='data:blog.pageType != &quot;item&quot;'> is one of codes to display widget on main blog post and post labels. You can use other codes to set the displaying widget by yourself.
- For type and function other code to set widget display, i'll post in next post.


Comments

Popular posts from this blog

How To Make Relocation Easier For Your Kids

By Martina Hill Moving it's troublesome in itself. You have to think about every little thing. When, on top of that, you have to deal with your kids, the relocation can easily become one of the most demanding life events. And for your forthcoming relocation moves with your little children we can provide you some professional tips which may help you in the whole process of moving. If you don't have frequent relocations, your move from one location to other will be a bewildering experience for your kids and teenaged children. Make sure your children know that they can ask you any question. You'll have to listen to them carefully. Being sincere and open will help your child feel confident about the process of moving, and will provide her the security that she needs to feel. Ask your kids to sort out their possessions. Giving this task to them will make your children feel that they have the command, and that they are implicated in the moving process. Leave her to do

10/10 FriendFeed - moonswamp

          FriendFeed - moonswamp         The Numerous Benefits Of Memory Foam Mattresses October 10, 2010 at 9:03 AM  

Lowongan Kerja

Lowongan Kerja Lowongan CPNS Kementerian PU Lowongan Kerja Perusahaan Migas Lowongan CPNS Kementan Lowongan Kerja Coca Cola Indonesia Lowongan Kerja MB Century Lowongan Kerja Ramada Bintang Bali Resort & Spa Lowongan Kerja TELKOMVision Lowongan Kerja Asuransi CAR Lowongan CPNS BPK Lowongan Kerja Wijaya Karya Lowongan BUMN RUKINDO Lowongan CPNS BNPB Lowongan Kerja Sampoerna Lowongan Kerja Pertambangan Lowongan Kerja Runge Limited Lowongan Kerja Wira Bhumi Sejati Lowongan Kerja Trimegah Bangun Persada Lowongan CPNS Kementerian PU Posted: 14 Oct 2010 05:34 PM PDT P E N G U M U M A N Nomor: KP.01.03-Mn/522.1 PENGADAAN CALON PEGAWAI NEGERI SIPIL KEMENTERIAN PEKERJAAN UMUM TINGKAT PASCA SARJANA (S2), SARJANA (S1), DIPLOMA EMPAT (D4) UNTUK GOLONGAN III, SERTA TINGKAT DIPLOMA TIGA (D3) UNTUK GOLONGAN II TAHUN ANGGARAN 2010 Kementerian Pekerjaan Umum Republik Indonesia membuka kesempatan kepada Warga Nega