Why does Google Chrome 9 not show images from Amazon S3? - javascript

If you go to this site, you'll notice a big image in the middle.
If you inspect it, you'll see this.
<img src="http://s3.amazonaws.com/mosaicimages/hmn58067pa">
If you hover over it during Inspect mode, you'll see this:
img[480x640]
And that's normal. The picture should display.
But sometimes, when I browse my site, the image simply does not display. The HTMl is the same. Everything is the same. It's just that the "cache" messes up.
This is what it looks like: http://i52.tinypic.com/1190xu0.jpg
When the image doesn't display, I clear the cache in Chrome browser settings, and the image displays again. After browsing the site again, random pictures disappear.
It's weird because when you inspect it, the code is the same. However, the image says:
img[0x0]
That's very awkward, because the image really is there. it's in S3 and it's fine.
It happens on other pages as well, not just this page. It happens for all images that are in S3.
Some of you may not be able to reproduce it. Some of my friends reproduce it. but if you can, please help, thanks.
Edit: I found a few bug issues related to Chrome? Is this it?
http://code.google.com/p/chromium/issues/detail?id=67373&can=1&q=image%20304&colspec=ID%20Stars%20Pri%20Area%20Feature%20Type%20Status%20Summary%20Modified%20Owner%20Mstone%20OS
http://code.google.com/p/chromium/issues/detail?id=68622
Edit: everything works fine in incognito mode.

Do you get the following warning in the console?
Resource interpreted as [something] but transferred with MIME type [something else]
It may happen if an image is loaded dynamically (i.e. img src changed at runtime on the client) - which was nicely responded to here.
This could also be caused by the browser actually receiving an incorrect MIME type declaration - I don't imagine that would be an S3-specific issue (given the apparently wide range of similar problems encountered) and would rather suggest it could be an issue with a forwarding (corporate?) proxy etc. - this was the case for us when including fonts but never with images.

Google chrome has an excellent report issue located in the settings tab, take this issue to them,atleast they will rectify in future release chrome versions.

Related

Remove "connecting to..." messages from browser/firefox

My website project uses html, PHP, javascript, css and mysql. My page is always fullscreen. (so no browser bars etc) Everything that is being displayed, is controled by my code. However...
My page reloads a php page in an iframe every 0.5 seconds. (and more might be added) When the page is loading, I get a "connecting with 192.168.XXX.XXX", or something scimilar, in the left bottom of my full screen. How do I disable these kinds of messages?
Most of my buttons are already javascript functions, since they have to do multiple things, but with a href=, I also get that same display in the bottom of my browser. This really screws up my full-screen layout.
Things I've tryed: google, and changing z-index of my images, in the hopes it would cover up this "connecting with" info box.
I would like to get a CSS/javascript solution for this problem. If I need to change browser settings with the "about:config" page in firefox, that is also fine.
*PS: English isn't my native language, and my browser is also in another language then english. Tryed to find a solution on google, but could not get any relevant info, not even the name of that bar.
As far as I know, it isn't possible to fix this problem using any code on my web page. It is browser related.
Finding some help at the mozillazine.org forums, got me to some good search queries.
If you want to remove the status bar (that's what it's called), you can use the plugin "Status-4-evar". It gets you the ability to turn back time, and get some lost functionality back into firefox. It also allows you to disable the status bar. However... When in full-screen, firefox (version 43.something) then puts back the unwanted status bar, even if the plugin/add-on should have blocked it.
Second solution should be to create a userChrome.css file, and put it in some directory in your firefox profile. Finding this directory using the mozilla KB was really frustrating, since it isn't correct/out of date.
Correct location for your userChrome.css file should be:
C:\Users\XXXX\AppData\Roaming\Mozilla\Firefox\Profiles*random string*.default\chrome\
c:\users\XXXXX\ could be different on other windows versions. The chrome folder might not excist, so just create it.
Then create the userChrome.css file, if it does not excist already, and add the following tekst:
#namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* only needed once */
.statuspanel-label {background:#FF9!important;color:black!important;font-family:"DejaVu Sans Mono"}
statuspanel {display:none!important}
statuspanel {max-width:90%!important}
statuspanel[type="overLink"] .statuspanel-label
statuspanel[type="status"] .statuspanel-label[value^="Looking"]
statuspanel[type="status"] .statuspanel-label[value^="Connect"]
statuspanel[type="status"] .statuspanel-label[value^="Waiting"]
statuspanel[type="status"] .statuspanel-label[value^="Transfer"]
After having done that, restart your firefox, and all status bar messages will be removed, even in full-screen.

Website not displaying correctly in Safari and Chrome

I'm a complete newbie here. I have been trying to learn to code a site with HTML/CSS/JAVASCRIPT.
I am using brackets to code the site. The site I am practicing with renders properly with all css and javascript.
However when I open the .html file into safari or firefox it does not display correctly. I think it is probably a css issue as the html elements are all there.
I have other sites that I have made before that don't have this issue and I can not see where I have gone wrong.
jsfiddle.net/fs4g55m2/1 I'm using fullpage.js as well. If you notice the navbar works perfectly well. It seems to be the css after it that is corrupted (once you get to the body tag).
If you think it is CSS (and you are linking to external CSS file) try look into the network tabs in your browser's developer console to see if it is properly linked. Check to see if requested css file throw back 404 status (not found) - usually highlighted in red.
In chrome or Firefox (not sure in safari) right click on your web page and click inspect element - then choose network tab.
Hope that helps

In Google Chrome, Google Docs can control headers and footers from javascript. Does anybody know how this is achieved?

That's basically it. Somehow, the javascript in Google Docs can turn off the default headers and footers showing the URL, date, page numbering, etc.
This only works in Google Chrome. When Google Docs is running from another browser it will print the headers/footers unless removed manually through the print configuration dialog. In Safari, it seems to generate a PDF server-side which of course will print outside of the browser.
I've searched around the web and have found nothing on how this is done. The javascript in the page is of course minified and obfuscated so it's difficult to get any insights from there.
So before I'm forced to dive into that spaghetti, I'd like to know if anybody has any ideas of how this is done.
After delving into some source code I found on a web page that has also resolved the issue (not Google Docs), the secret is the following CSS:
#page
{
margin:0;
}
This only works on Chrome, and perhaps Opera though I have to verify if the latter is true as it's printing the background color by default while chrome prints with a white background and the colored background in my page might be just obscuring the header/footer text.
Other browsers give differing results:
Firefox and Safari ignore the margins apparently and print the headers/footers anyway.
IE9 makes a mess of things and the contents print overlapped with the header/footer text. Poor browser always gets all the heat...
In conclusion, combining this with silent printing coming out in Chrome 18 kiosk mode will make for some interesting functionality, such as mail merge capabilities right from the browser though I still have to research how secure kiosk mode is though, as navigating to a malicious page runs the risk of exhausting printer ink and paper.
Navigation should be restricted to a URL white-list in this case.

Firefox and IE continue to load after content has been inserted into a DIV

I have a situation where I'm inserting javascript generated HTML code into a DIV. One would think this would be a no brainer, but for some reason, once the code is in, the status bar and tab loading graphics start up in both browsers and never stop again. The page continually appears to be loading data, but in reality, there's nothing more to load. Any idea why this may be happening? Solutions? I appreciate any help. Thanks!
Install the Firebug plug-in for Firefox. Open it up and got to the NET tab. That will allow you to see your network activity. Something on the server may be stalling. This will help you find it.

why does firebug debugging sometimes work and sometimes not?

I want to debug a javascript file that is embedded in the HEAD element.
I navigate to the site, see the code, and make a breakpoint:
(source: deviantsart.com)
But when I click on Reload, the script disappears and it doesn't stop at the breakpoint:
(source: deviantsart.com)
Debugging was working earlier so I know it works in general. What do I have to do so that Firebug always debugs my script?
I've noticed this behaviour before as well. It seems that it can happen if you refresh the page while the debugger is running (i.e. after you've hit your breakpoint and are stepping through code). This is far from conclusive, just something I've casually observed over time.
Also, I try to avoid having multiple tabs open with firebug active, as it seems to get confused.
Edit: just thought I'd add that I've seen this manifest itself in a few different ways:
the external script file does not appear at all in the scripts panel.
the external script file appears but firebug doesn't "see" it. You know this has happened because the line numbers beside the code where a breakpoint can be set won't be highlighted (used to be green but now appear to be just a darker shade than other lines). I've seen this happen with inline javascript on a HTML page (horrors!) as well.
the external script file is there, but you can only see a single screen full of code. Where "screen full" is the firebug panel viewport.
shut down firefox and then restart. sometimes firebug gets confused. also make sure you have the latest version.
You need activate the script tab
I'm not sure that having a <script> inside <head> (as opposed to, inside <body>) is actually legal HTML. If it's not, as I suspect, you can't fault Firebug for not supporting it well...!-)
The bugs in script processing that I know about are 1) jquery dynamic loading of scripts fails, 2) new Function() cannot be seen, 3) some kinds of document.write() cannot be seen.
Firebug processes script files in series with Firefox. This means that Firebug must be active when the page loads and it means that any exception in the path will cause the files to be mis-processed. If you opened firebug before loading and you still see problems, then the most likely fix is to install Firebug in a new Firefox profile. This causes you to get a completely fresh set of default options and you run Firebug without other extensions. As you re-add other extensions, look for problems in seeing scripts: then maybe you will discover what extension is interfering with the code path for processing scripts. I know this is a pain in the neck, but so is JS debugging without source ;-). We are working on testing with more Firebug and Firefox extensions installed to try to reduce these problems.
In our case it was the bundling of JS files.
It is not only FireFox, it is same for Chrome.
We moved the file out of the bundle and put it on the page where it needed to be referenced and it started working like charm.

Categories