zoukankan      html  css  js  c++  java
  • HTML5 预加载功能

    HTML5对link的rel属性添加N多值,其中最有用的就是预加载功能了。它比网上提到图片预加载有时不同,它的加载时机是由浏览器决定的,只有在空闲时间才偷偷加载指定资源,防止一下子加载这么多东西把页面卡死。

    下面是MDC的说明

    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.

    支持浏览器Firefox 3.5+,chrome 13+。

    如何使用?

    
      
      
    

    当然这不只敢于HTML页面,还可以是图片,JS,HTML等资源。这对于我们加快页面载入速度非常有帮助。

  • 相关阅读:
    LDD3 第7章 Time,Delays and Deferred Work
    4412 gpio读取pwm
    LDD快速参考
    4412 4路pwm输出
    PCB六层板学习(一)
    STM32 TIM3 PWM输出 4路
    4412 学习目录总结
    4412 Linux定时器
    4412 SPI驱动
    4412 i2c驱动
  • 原文地址:https://www.cnblogs.com/rubylouvre/p/2174608.html
Copyright © 2011-2022 走看看