Giter VIP home page Giter VIP logo

favicontest's Introduction

FavIconTest Chrome Extension

This is a minimal Chrome Extension to demonstrate a performance issue when loading Favicons in a Chrome Extension.

What I Expect To Happen: I would expect all accesses to "chrome://favicon/" URLs from within a Chrome Extension to be fulfilled from Chrome's favicon cache whenever possible.

What Actually Happens: Favicon accesses within certain callbacks (such as chrome.history.search) are fulfilled from the cache; Favicon accesses outside these callbacks are not fulfilled from cache.

To Install and Reproduce The Issue

  1. Clone or unzip this repository and load it as an unpacked extension (in chrome://extensions).

  2. Find the Extension's ID in its entry on chrome://extensions (a long string like 'lpnflkebdccfoepecaiieggjkbjejkdi').

  3. Construct the URL to open the extension's iconic_history.html page using the ID, and open this in a new tab. For example: 'chrome-extension://lpnflkebdccfoepecaiieggjkbjejkdi/iconic_history.html'.

  4. Open Developer Tools, select 'Network', and Reload the page. You should see something like this:

Screenshot of FavIconTest Network timeline

Note in the timeline that the first two favicons (CNN and Wikipedia) are not from the favicon cache, while the latter two items (yahoo and wework) are served from the cache. You may have to open the four URLs used for testing here to prime the favicon cache -- see iconic_history.js for the exact URLs.

This behavior is consistent across repeated reloads of the page.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.