Salah satu ambisi seorang pengembang browser dan pengembang web adalah penjelajahan situs web yang lebih cepat. Beberapa teknik telah diimplementasikan sehari-hari seperti teknik optimasi CSS dan Image, teknik caching lebih lama dengan htaccess, kompresi file javascript, penggunaan CDN dll. Dalam tulisan ini, saya coba memperkenalkan teknik optimasi yang diperkenalkan oleh Firefox terbaru yaitu Link Prefetching.

Apa itu Link Prefetching

Link prefetching is a browser mechanism, which utilizes browser idle time to download or prefetch documents that the user might visit in the near future. A web page provides a set of prefetching hints to the browser, and after the browser is finished loading the page, it begins silently prefetching specified documents and stores them in its cache. When the user visits one of the prefetched documents, it can be served up quickly out of the browser’s cache. — MDC

Singkat kata, Link Prefetching adalah mekanisme browser yang memberdayakan kesiagaan browser untuk mengunduh atau memuat dokumen yang kemungkinan besar akan digunakan/diakses kemudian hari oleh pengguna. Teknik Prefetching Link ini baru tersedia pada HTML5.

Contoh

Contohnya:

<!-- full page -->
<link rel="prefetch" href="http://emka.web.id/articles" />

<!-- just an image -->
<link rel="prefetch" href="http://emka.web.id/images/download.png" />

Prefetching dilakukan dengan tag LINK dan mencantumkan “prefetch” sebagai nilai dari variabel rel dan kemudian URL/Path ke tujuan. Disamping sintaks tersebut, Mozilla juga memperkenalkan attribut rel yang lain yaitu alternate, stylesheet, dan next. Prefetching juga bisa berlaku untuk protokol HTTPS.

Catatan

- prefetching berlaku untuk kasus antar-domain termasuk mengambil cookie dari situs tersebut,
- prefeching cukup merugikan web yang dituju karena relatif tak mempengaruhi statistik pengunjung,
- hanya Firefox yang mendukung teknologi ini.

Hasil pencarian tentang artikel ini:

prefetching, html5 optimasi, optimasi dalam prefetching

Tulisan Menarik


No Comments on “Prefetching Link dengan HTML5”

You can track this conversation through its atom feed.

No one has commented on this entry yet.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

 




Switch to our mobile site