Here is the simple HTML
<html>
<head><head>
<body>
<img src='\\{NETWORK_FILE_SHARE_PATH}\pic_pipeline1.jpg' title='pipePic' height='24' alt='alt-image'/>
</body>
</html>
I view this html file in IE10 and Chrome Version 39.0.2171.65 and I can see the image. But if I open it with FireFox 33.1 all I see are the words "alt-image"
Why is this happening?
Firefox is sandboxing possible malicious content.
If it is not a file:// url, the browser should not allow access to the filesystem for any purpose.
One possible misuse would be to load local images and upload them without your consent.
Related
I am trying to allow users to download a file. I took this example here:
https://www.w3schools.com/tags/tryit.asp?filename=tryhtml5_a_download
When I click their w3 photo I get a jpg download in Chrome.
However, when I copy their html onto my local machine into a plain static html file, I open the html file in Chrome, then I attempt to download that file, and then Chrome just opens up the photo in a different window without downloading anything. Anyone know what's the problem?
My code (which is almost the exact same):
<!DOCTYPE html>
<html>
<body>
<h1>The a download attribute</h1>
<p>Click on the image to download it:<p>
<a href="images/myw3schoolsimage.jpg" download>
<img src="images/myw3schoolsimage.jpg" alt="W3Schools" width="104" height="142">
</a>
<p><b>Note:</b> The download attribute is not supported in IE or Edge (prior version 18), or in Safari (prior version 10.1).</p>
</body>
</html>
I downloaded the w3 image locally onto my computer so it should'n't be a cross site origin issue
You would be better served studying almost anywhere but w3schools.
But more to your problem, are you running a webserver locally, or depending on file:/// links?
incognito mode will not impact your testing in any way.
A quick glance at google results for ‘download from file:/// link fails’ will show that there are an host of issues surrounding local file downloads and the file:/// links, especially on chrome.
This is not surprising - chrome is a browser not a web server.
Where the semantics of such ‘downloads’ are inconsistently defined for browsers, the semantics of true downloads are well defined, and their behavior consistent in a true service context.
To further both your understanding of these tools and the goals of your project, I strongly encourage you to download and install a webserver for your platform and learn the basics of it’s configuration and deployment.
You will not regret having done so.
Is there any special css automatically added when an html file is loaded from local filesystem? The exact html is displayed slightly differently when loaded dynamically from a webserver. See the screenshots:
From a local file stored in a local disk and opened in Chrome:
The same content loaded from a web server in Chrome:
I am trying to get the html displayed as in the local file, i.e. with margins and paddings. I know that I can add css style, but I'm curious to know why these two are displayed differently.
Using this html:
<html>
<head>
<title>test1</title>
</head>
<body>
<div>
<p><strong><span>TEST1</span></strong></p>
<p><strong>Test2</strong></p>
<p>testparagraph.</p>
</div>
</body></html>
Having tested in incognito mode in Chrome, everything seems to work fine. This is likely caused by some kind of extension.
I am using an URL in src of img tag of HTML to display the image, it works fine in Chrome but in Internet explorer it is a broken link.
This is how the URL looks like,
https://AAA.visualstudio.com/_apis/wit/attachments/72651f99-6fb6-4297-94a5-dfff1c5e94b9?fileName=vsts.png
I am guessing, the filename at the end is causing this issue, if its the case what is the solution for this.
Sample code:
<!DOCTYPE html>
<html>
<body>
<img src="https://AAA.visualstudio.com/_apis/wit/attachments/72651f99-6fb6-4297-94a5-dfff1c5e94b9?fileName=vsts.png">
</body>
</html>
If I use the same URL to view, it displays the image properly.
EDIT: It looks like the internet explorer is not passing the session details like authentication, so the response I am getting visual studio is Sign in page instead of image data.
You can probably see the image in the browser because you are logged into a Microsoft account and therefore have access to the image. To make your html able to access this image you need to make your hosting server log in to that Microsoft account.
I have just stumbled across some behavior that looks weird to me.
There is a small static test page on my webserver that has the following code:
<html>
<body>
<a href="ftp://my-ftp-server/t.jpg">
<img src="ftp://my-ftp-server/t.jpg"/></a>
<br>image
</body>
</html>
When I load the page in Firefox 51, the image on the page is shown as broken. In the standard Firefox developer console I do not see any requests (well, it is an FTP request, so not surprising it is not shown in HTTP requests list).
When I click on the image box, the image loads correctly.
What I checked so far:
Both links are identical.
The page opens in Google Chrome 56 correctly.
When I change the image data link from ftp to http (the ftp server is accessible via http) the page loads correctly in Firefox.
This does not seem to be a caching issue (clearing the cache does not resolve it)
There is no AdBlock or similar add-ons installed.
Developer console shows "Could not load the" tooltip when mouse hovers over the image link.
What could be the reason for Firefox 51 not displaying the image with data accessible via FTP?
Details: This is Mozilla Firefox 51.0.1 built for OpenSUSE Leap 42.1. So far I could not reproduce neither on Google Chrome, nor on Firefox 50.1.0.
I have created custom HTML facebook page by pasting my own source code. Its working fine in all browsers Firefox, Safari, IE. But in Google Chrome its not loading external CSS, javascript and everything. Its just text.
Facebook page here:
http://www.facebook.com/KoucPavelMilanCerny/app_190322544333196
Any ideas what to do? Is Chrome blocking loading of external CSS in iframes?
If you use the Chrome Inspector tool and look in the console tab you see these issues:
Try hosting your css and js on the same server as the web page.