Displaying chrome://favicon/ on newtab page - google-chrome

I'm developing a Google Chrome extension where bookmarks are displayed on the newtab page. Everything works fine so far except for the favicons.
Entering this URL in Chrome displays the favicon of a page:
chrome://favicon/https://stackoverflow.com/
However, in the newtab, which I properly set up, they don't get displayed.
The HTML is very simple, though:
<img src="chrome://favicon/https://stackoverflow.com/" />

I don't think it's anywhere in the docs, but accessing chrome://favicon/ needs a special permission "chrome://favicon/" in the manifest.
Do note:
This may change in the future.
chrome://favicon is not entirely reliable.

Related

Chrome can't see images that require username/password

So this is a weird problem, I am attempting to embed a video stream from a D-Link DCS-930L into a web page. My embed looks like this:
<img alt="" src="http://guest:password#192.0.0.10/video.cgi">
The problem is that Chrome displays a broken link image when I load the page, while Firefox and IE load it perfectly the first time.
But the really strange part is that if I right click on the broken image > Open link in new tab the stream loads, and then if I close the tab and refresh the page with the embed it loads there too! So it's definitely something to do with the username/password requirement.
I have also tried creating a user without a password but I see the same issue. There is no setting to disable this requirement in the 930L's control panel that I can find.
Does anyone know how to fix this? If not, is there a way to use PHP to execute a login automatically for the above kind of URLs?
This appears to be intentional behavior on Chrome's part since v19. Bummer.

Links to PDF and other file formats generate "Page can not be displayed"

I just created this site and because I am using a Mac, I do not have IE. I have had a few people tell me that they are not able to download PDF files. That is to say, when they click on a link that is supposed to display a PDF file in a new tab, they get a "This page can not be displayed" error. I can take the same file and put it on a different website, create a link and it works fine in IE.
The link to this page is www.dallascameraclub.org. Try clicking on any Newsletter as they are all PDF's. They will produce an error in IE. Works fine in Safari, Firefox, and Chrome.
This is a wordpress site and I have never heard nor had this problem before. I have no idea why this would be the case.
Research seems to always blame IE for something or another but there are several people complaining of this when this issue never happened on the older site. Same links, same PDF's and other document types. I am a bit perplexed.
Any ideas?
Many thanks,
Houston

Empty IMG SRC trigger logout in IE

I'm developing a web system now, and have debugged a very strange bug just now.
First I describe the bug itself here.
Problem:
When visit http://mysite/, it redirects to login and do logout at once.
There is a page, which url is /site.php?arg1=xxx&arg2=xxx everything is well in chrome, but when I use the ie8, after this page loaded, the account is logged out!
Bug Location:
After a long term of debugging, I found that the point which causing the problem is:
<img class="item_thumbnail" src="" />
If I remove this tag, everything become good.
So I'm wondering: when the <img> tag render, what's its behavior? Will it request the login page? But everything is in mass with ie.
What cause this problem? And what will ie an non-ie deal with the img-src?
Need your help!
As I suspected, according to
Empty image src can destroy your site
Internet Explorer makes a request to the directory in which the page
is located. For example, if you have a page running at
http://www.example.com/dir/mypage.htm that has one of these patterns,
IE makes a request to http://www.example.com/dir/ to fill in the
image.
Safari and Chrome make a request to the actual page itself. So
the page running at http://www.example.com/dir/mypage.htm results in a
second request to http://www.example.com/dir/mypage.htm to fill in the
image.
Hit F12 and look in the network tab to see.

Issues on chrome showing an embedded PDF

I have the following code in a html document:
<p>PDF sample</p>
<object data="http://www.whateverdomain.com/whatever/~/media/sample.pdf" type="application/pdf"></object>
This is working in IE, Firefox but not in Chrome. Appears a grey box in the browser with no embedded pdf. When I check on "network" tab in chrome I'm receiving a HTTP 200 response but PDF is not shown.
I tried URL encode tilde "~" symbol replacing it by %7e but still its not working on Chrome.
I don't have the possibility of changing the url which is provided by an external service.
Do you have any clue on how to solve ?
You might wish to try and use a simple iframe. At the very least I am pretty sure that works for chrome, might not work for IE though. Another alternative is using the Google Docs viewer, with that you are sure to be cross browser compatible, although some pdf's might not render perfectly. The last option you have is using something like pdf.js to render the pdf's yourself inside the browser. Gives you a lot of control and ensures that even people running computers without a pdf viewer installed (or a native pdf viewer like chrome and firefox) will be able to view the file.

open pdf in iphone webapp

I am trying to open a pdf from my JQM webapp. I have tried iframes/embed/object, and none of those work on an iphone like they do on a desktop browser (scrolling, zooming, etc). I have settled with simply opening the pdf via a link Link. This works fine in the standard browser because the user can simply use the browser back button to navigate back to my app.
The issue that I am having, is that when a user saves the page to thier home screen and opens it using the chromeless safari browser, they no longer have the browser back button. I have tried adding target="_blank" to the link, but apparently JQM hijacks the link and prevents opening in a new page, and I have been unable to get the hacks to work.
I have also tried pdf.js, but I can't seem to even get that to work as my javascript knowledge is fairly limited, and the examples are pretty advanced. The only tutorial that I found used an old version which I couldn't get to work.
Are there any ways to bypass the JQM in openning a link in a new window (which would in turn open in the mobile safari rather than my chromeless web app), or are there any other suggestions for how to open a pdf from a webapp?
Just disable the default jQuery Mobile behaviour, by specifying data-ajax=false.
For example:
Link
See http://jquerymobile.com/demos/1.2.0/docs/pages/page-links.html
For my webApps I used https://docs.google.com/viewer to embed the pdf into my interface.
So, when I navigate the webApp by home screen icon, the app doesn't close when I open the pdf.
I met the same question: open pdf in webapp with html5.
I've tried several solutions: iframe、embed、pdf.js, but none of them is the best solution.
tips: iOS 9.x upper, open pdf with iframe only show the first page of the pdf file, and there will be a <img /> tag in the iframe body when you debug.
util now I still have this troublesome problem, anyone has solution please write your experience here.
Thank you.