Sources Appear Mysteriously - node.js

I thought I understood how browsers work, but it seems not. :(
Given a web page:
<html>
<head>
<meta charset="utf-8">
<title>My website</title>
<link rel="stylesheet" href="styles/main.css" charset="utf-8">
</head>
<body>
<div id="container"></div>
<script src="scripts/main.js" charset="utf-8"></script>
</body>
</html>
Served locally by nodejs, the Network panel:
Okay, right. But there's a bunch more Sources not appearing in Network activity:
How do they get there? I see no references to src/scripts/main.jsx or /node_modules in main.js or anywhere else.
BACKGROUND
This is certainly due to some error in my gulp build, specifically with browserify (and babel/react). I'm doing something wrong there, but I'm much more troubled that I cannot understand how these sources are turning up in my browser.

A discrepancy here is most likely due to source maps. From the sources tab, click the menu icon in the top right and select settings. From here uncheck "Enable JavaScript source maps" and refresh to see if this is indeed the culprit.

Related

Unable To Print PDF file Using Print Js

Below Given is my code from which I am trying to print pdf file.
<!DOCTYPE html>
<html>
<head>
<title></title>
<script type="text/javascript" src="print.min.js"></script>
<link rel="stylesheet" type="text/css" href="print.min.css">
</head>
<body>
<script type="text/javascript">
function sample(){
printJS({
printable: "test.pdf",
type: "pdf",
});
}
</script>
<button onclick="sample()">Click Me</button>
</body>
</html>
but it is not working and diving below error on chrome console
Access to XMLHttpRequest at 'file:///test.pdf' from origin 'null' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, chrome-untrusted, https.
I am following all the rules said in documentation of Print-js. my {.pdf} file and {.html} file are in same folder. It is Working Fine with {.jpg} File.
Please help me.
I am sharing link of the script I have included in my head tag
JS:- https://printjs-4de6.kxcdn.com/print.min.js
CSS:- https://printjs-4de6.kxcdn.com/print.min.css
It was the problem regarding "Cross origin requests". To solve this you need to start your local server. in my case I started Xampp and moved my files to htdocs folder and BOOM it worked.. I Still dont know why it was working for images and not for pdfs.
HERE IS THE ANSWER ON STACK-OVERFLOW THAT HELPED ME.
https://stackoverflow.com/a/20578692/10333164

How to allow cross-origin access for Outlook Web Add-In

I developed a Outlook Web Add-in using Visual Studio 2017, and so far all my testing is based on hosting the Add-in from localhost, and I had no issues with that, everything worked fine. Now, I moved my Add-in to a shared folder on my Sharepoint server, so that others can test my Add-in.
Within my manifest file, I changed the line which defines the URL of my function file to point to where it is hosted:
<FunctionFile resid="FunctionFile.Url" />
I also added in a line under
<AppDomain>https://<My URL Domain></AppDomain>
The image of my add-in icon loads find, however when I click on my add-in icon from my OWA page, I get the following error:
SEC7120: [CORS] The origin 'https://' failed to allow a cross-origin document resource at 'ms-appx-web:///assets/errorpages/forbidframingedge.htm#https:///Functions/FunctionFile.html?et='.
Is there any way to allow my add-in to run? I'm currently doing my testing on the Edge Browser.
Thanks!
Update:
Here's my function file html code:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<title></title>
<script src="../Scripts/jquery-3.3.1.min.js" type="text/javascript">
</script>
<script src="../Scripts/Office/MicrosoftAjax.js" type="text/javascript">
</script>
<script src="../Scripts/Office/1/office.js" type="text/javascript">
</script>
<script src="FunctionFile.js" type="text/javascript"></script>
</head>
<body>
<!-- NOTE: The body is empty on purpose. Since this is invoked via a button, there is no UI to render. -->
</body>
</html>

Force IE8 compatibility mode off for Intranet site using meta tags

All of the following questions are related and some of them marked as fix but does not seem to be working.
My problem:
Problem with IE8.
I have Intranet site built on Primefaces 5.1.7,
JSF 2.2.8-04
Trying to disable compatibility mode of IE8 which is
enabled by default for Intranet web sites.
Problem is we want to set minimum browser requirement to IE8, but web side is run on Intranet domain so it by default runs on compatibility mode and IE8 user is not allowed to login.
Solution Available (Not working):
<f:facet name="first">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
</f:facet>
Following does not work:
Force IE compatibility mode off using tags
Force "Internet Explorer 8" browser mode in intranet
X-UA-Compatible not working in IE 9 for intranet sites
intranet jsf application opening in compatibility mode in IE9
How to fix Document mode restart in IE 9
Any help is appreciated.
First Edit
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<link type="text/css" rel="stylesheet" href="/payroll/javax.faces.resource/theme.css.jsf?ln=primefaces-bluesky" />
<link type="text/css" rel="stylesheet" href="/payroll/javax.faces.resource/css/screen.css.jsf" />
<script type="text/javascript" src="/payroll/javax.faces.resource/jquery/jquery.js.jsf?ln=primefaces&v=5.1.7"></script>
<script type="text/javascript" src="/payroll/javax.faces.resource/primefaces.js.jsf?ln=primefaces&v=5.1.7"></script>
<link type="text/css" rel="stylesheet" href="/payroll/javax.faces.resource/primefaces.css.jsf?ln=primefaces&v=5.1.7" />
<script type="text/javascript" src="/payroll/javax.faces.resource/jquery/jquery-plugins.js.jsf?ln=primefaces&v=5.1.7"></script>
<title>Payroll Center</title>
<script type="text/javascript" src="/payroll/javax.faces.resource/js/script.js.jsf"></script><!--[if lt IE 9]>
<script type="text/javascript" src="/payroll/resources/js/selectivizr-min.js"></script><![endif]-->
<link rel="shortcut icon" href="/payroll/resources/img/favicon.ico" />
</head>
Second Edit:
Screenshot is from IE developer tool.
I removed that xml tag
There are two things in tool Browser mode and Document Mode.
Document Mode is getting changed to IE8 Standards but Browser mode remains the same, Browser mode is the key to change version which does not gets changed.
I might me wrong i am just guessing for now that document mode gives ability to run some IE8 features but still running under IE8 compatibility mode which is basicall version IE7. NOT SURE GUESS
Third Edit:
As per following blog you can not change browser mode but this was written in 2010. i am no sure how much valid this is but what he explains actually happening. But require second opinion if this is really true. http://blogs.msdn.com/b/ie/archive/2010/10/19/testing-sites-with-browser-mode-vs-doc-mode.aspx
Thanks again for your time

IE9 HTTPS security is compromised by http://v.zilionfast.in

I have a problem with https security in IE9 only... the message talk about an url that doesn't exist in my code "http://v.zilionfast.in/257344370/?t=vrt".
The issue was detected in different pc (in different networks) with IE9, some of them show the error message, others doesn't show anything.
I have no clue about what script is calling this url because i can't find it. Somebody have a clue about what is happening?
this is the code of the header basically:
<script type="text/javascript" src="#rutaIni#/swfobject.js"></script>
<script type="text/javascript" src="#rutaIni#/basicos.js"></script>
<script type="text/javascript" src="#rutaIni#/prototype-packed.js"></script>
<script type="text/javascript" src="#rutaIni#/scriptaculous.js"></script>
<script type="text/javascript" src="#rutaIni#/glider.js"></script>
<script src="#rutaIni#/modalbox.js" type="/text/javascript"></script>
<link href="#rutaIni#/modalbox.css" rel="stylesheet" type="text/css" media="screen" />
the other part of the code is just a table that is filled with a query and some html (no problem with that).
thank you!!!
It looks like this site is flagged by Vipre and other Internet Security and Antivirus programs to be malicious. It is possible that your web browser has been infected or your code contains elements associated with the site. The only way to know for sure is for you to post your code.

why does my website appear inside a <frameset>?

I have a website (just for my own references, nothing interesting for the public.)
When I load my page (Test Page) inside IE9 and view the source of the page - I can see the HTML as expected.
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<title>Test Page</title>
</head>
<body>
<div id="body">
Simple test page, with an image. <br />
<img src="http://www.w3.org/2008/site/images/logo-w3c-mobile-lg" alt="WC3 logo" />
</div>
</body>
</html>
But when I look at the developers toolbar (by pressing f12) the HTML appears in a <framset> tag.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Marrowbrook.com </title>
</head>
<frameset rows="100%,*" border="0">
<frame src="http://217.118.128.188/wotney//TestFiles/testpage.htm" frameborder="0" />
<frame frameborder="0" noresize />
</frameset>
<!-- pageok -->
<!-- 02 -->
<!-- ->
</html>
Using Chrome, if I right click and View Source, I see the above <frameset> code, but I can also right click and select View Frame Source where I can see the HTML as expected.
Can anyone tell me why I'm seeing this ?
Thanks.
This could happen because your host name was bought with one provider, but you are hosting it on another - and you got a frame based redirect setup.
What platform is your site hosted on? It looks like the server is doing something, because the src of the frame in the frameset points to your page. It could be some kind of 'preview mode' or something of the server/cms. So it looks like the server is using a default page with a frameset on it, that pulls your actual page into it after you deploy it
It also happens when the domain you are using to get to the site is set as "Masked" Forwarding.
Check with the domain manager on your hosting and remove masked forwarding.

Resources