The "Go Back" problem

117 views
Skip to first unread message

Ziyuan Yao

unread,
Aug 14, 2012, 10:47:32 AM8/14/12
to chromium-...@chromium.org
Suppose you have a Chrome extension that has an Options page, and this Options page has a link to an external address (e.g. http://www.google.com). Now if the user clicks that link to open http://www.google.com in the *current* tab, and then click Chrome's "Go Back" button, the user will see "Unable to connect to chrome-extension://invalid/".

I know this is due to Chrome's security paranoia. My real problem is that I have a PDF file inside my extension and this PDF file has a link to an external address like the above, and Chrome's built-in PDF viewer can only open the link in the current tab, and when I go back, I see the error message described above.

Any idea?

Ziyuan Yao

unread,
Aug 14, 2012, 10:50:14 AM8/14/12
to chromium-...@chromium.org
If I host the PDF file on a website rather than include it in the extension, "Go Back" will function well. But I wonder if I can somehow put the PDF file in the extension and still work around that error message.

Mihai Parparita

unread,
Aug 14, 2012, 10:50:12 AM8/14/12
to Ziyuan Yao, chromium-...@chromium.org
This is actually a bug. It should be fixed by http://crrev.com/150606 (currently just in the Canary channel).

Mihai

--
You received this message because you are subscribed to the Google Groups "Chromium-extensions" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msg/chromium-extensions/-/dC7hDGPNY40J.
To post to this group, send email to chromium-...@chromium.org.
To unsubscribe from this group, send email to chromium-extens...@chromium.org.
For more options, visit this group at http://groups.google.com/a/chromium.org/group/chromium-extensions/?hl=en.

Ziyuan Yao

unread,
Aug 14, 2012, 11:05:49 AM8/14/12
to chromium-...@chromium.org, Ziyuan Yao
I found a solution! Just put that PDF file in manifest.json's "web_accessible_resources" :-)))
Mihai

To unsubscribe from this group, send email to chromium-extensions+unsub...@chromium.org.

Jim Klo

unread,
Aug 14, 2012, 11:13:00 AM8/14/12
to Mihai Parparita, Ziyuan Yao, <chromium-extensions@chromium.org>
what happens if you declare the pdf in the manifest as:

{
...
"web_accessible_resources": [
        "somedoc.pdf"
    ]
...
}

That solved my problem in instances like this.

Jim Klo
Senior Software Engineer
Center for Software Engineering
SRI International
t. @nsomnac
Reply all
Reply to author
Forward
0 new messages