moutard / SubZoom-Proto1

1 stars 1 forks source link

Block content script on ghost pages #135

Open rkorach opened 11 years ago

rkorach commented 11 years ago

Content scripts run on ghost pages. In particular https://www.google.com/webhp?sourceid=chrome-instant&ion=1&ie=UTF-8 is always chatting with the bg page uselessly. Worse, it seems that chrome instant prerenders the first result (that will load a ghost page with content-script, messaging, and all..)

We need to fix this.

moutard commented 11 years ago

there is a system to avoid that, called exclude_container. content script are loaded in ghost page but with exlude container they are not saved. it was in the messaging but for the moment we did not copy everything. not sure we can prevent content script from loading in ghost page because the system of parsing is really simple.

On Tue, Feb 26, 2013 at 4:47 PM, Raphaël Korach notifications@github.comwrote:

Content scripts run on ghost pages. In particular https://www.google.com/webhp?sourceid=chrome-instant&ion=1&ie=UTF-8 is always chatting with the bg page uselessly. Worse, it seems that chrome instant prerenders the first result (that will load a ghost page with content-script, messaging, and all..)

We need to fix this.

— Reply to this email directly or view it on GitHubhttps://github.com/moutard/SubZoom-Proto1/issues/135 .

rkorach commented 11 years ago

Cool. Can I add it?

rkorach commented 11 years ago

There is the possibility to precise exclude_globs: ["https://www.google.com/webh*"] in manifest. Problem is that if someone does validate google search with real-time suggestion, content script won't run, and there will be no added visitItem. (same with exclude_container)

Workaround: this ghost page seems to be triggering from a tabId : -1 we should filter this message.