Skip to content
This repository has been archived by the owner on Dec 3, 2020. It is now read-only.

Attempt product page recognition earlier than after page load #29

Closed
biancadanforth opened this issue Jul 17, 2018 · 1 comment
Closed
Assignees
Milestone

Comments

@biancadanforth
Copy link
Collaborator

biancadanforth commented Jul 17, 2018

In my review of PR #22 , we observed that there is a considerable delay (of ~5 seconds) for the pageAction to appear on a product page. This is because currently we wait until the page has completely finished loading before checking for product elements in the DOM.

It is possible that the information we are looking for is available earlier for some pages. For example, there may be pages where JavaScript does not alter the original DOM from the HTML document, or does so well before the entire page has finished loading.

It is also possible there could be supplementary information that is available earlier that we could use to more quickly identify a product page. For example, building off of PR #24 , we could list RegExps of product page URLs in our static ruleset for specific sites. With this, we would only need the URL for the page to recognize it. While this may not get us to the specific product information any faster, it could save us from unnecessarily doing work on non-product pages.

@javaun
Copy link

javaun commented Sep 4, 2018

This is a good idea, I've noticed it too. If we can't get it faster (or possibly we do this in addition) we could also condition the user with a "ready" prompt -- such a blue flash of the toolbar icon -- to let the user know that if they click in the doorhanger the "track this product" button is ready to go

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants