Pop-Up Message With out opening a page - web

Well, This is the thing, I was navigating the internet any page, and suddenly, A Pop Up windows appeared on screen from my ISP (To remind me I didn't pay today) ... so Do you know how to send that kind of messages without opening the webpage or installing anything on a pc?

I was navigating the internet any page...
Since your internet access is through the ISP, they have the ability to manipulate the traffic coming through their hardware. This includes replacing the content of a site, appending content, or inserting content.
Obviously they can't alter the actual site, but if you request "foo.com" and you haven't paid your bill, they can return whatever they want in response to your request.
They could return <script>window.open()</script> + the HTML content of "foo.com". Invalid, but browsers will render it. They could return a warning page. They could return an HTTP status code. You get the idea.
If you didn't have your web browser open, then something is installed in the background (whether or not you know it). Most hardware comes with dozens of background services which try to be "helpful".

Related

How does Blazor hijack the Browser-Back button?

Blazor-Server apps use the SignalR circuit.
I can somewhat understand how there is JS that change events happening from the DOM, so instead of sending a new HTTP GET request the framework manipulates the DOM and displays the new blazor page.
But how is it even possible that the circuit is still active and working on page back button? This is a BROWSER FEATURE, not some html element, which can be changed, right? Would it not be a security issue if the browser back button behavior can be manipulated in different ways?
Not firing a new HTTP GET request on page back seems pretty hacky. Wouldn't that allow for malicious websites to do the same? Can websites access the last page visited with that??
How does the browser "know" that the last page should also use the same websocket circuit?
Is it then possible to tell the browser that it should establish a websocket on a past page, that didn't even have any before (would seem like a security risk)?
How does the back button differ from hitting "enter" in the address bar (which will always cut and establish a new circuit)?
Is the back button exactly the same as calling JS history.back() ?

Started fullstackopen for the first time and getting a "favicon.ico" request in the network tab

So I basically started this web dev course by fullstackopen and in one of the steps it says that once you open the Developer Console, and refresh the tab, 2 requests shall appear (one HTTP GET request and the another for an image to be retrieved from the server, but whenever I refresh I get this unknown request called "favicon.ico" every time. For the next steps also the same is happening. While the courses explains all the other requests made, it does not even talk about this one because this does not appear in their examples. So I just wanted to know why I am getting this random request. first one is what the network tab should have displayed
second image shows what I get when I follow the instructions of the course
As Akki mentioned, this is the icon you would see on a tab in the browser. Like the StackOverflow icon for this page.
You are getting a status 200 response, so it does find it in your root
Modern browsers will show an icon to the left of the URL. This known as the favicon.ico and is typically fetched from website.com/favicon.ico. Your browser will automatically request it when browsing to different sites. If your browser receives a valid favicon.ico file, it will display this icon. If it fails, it will not display a special icon.
In either circumstances, browsing is not affected.
It would seem that you don't have a favicon in your root directory of the project thus the unknown request

Checking other users are viewing this page in Node Express

I have a NodeJs Express app and when a particular user goes to a page/route would like to identify and display if another user is currently viewing the page as well. So for example it would say "Jerry currently viewing this page" and someone else goes there.
Is there any easy/lightweight way to do this?
First off, with a regular web page, the server only knows who and when a page was requested. It doesn't, all by itself, know whether that user is still viewing that page or not. The user could have closed the browser, typed something else in the URL bar, the computer could have gone to sleep, etc...
Second off, even if the page is still being displayed in the browser, you can't know if someone is actually there at the computer or not. The best you could do is to try to keep track of activity in that web page (last mouse click, recent mouse movements over the web page, etc...).
Then, to even have any idea of the web page is even still open in the browser, you need some way of tracking that notion. There are two possibilities I can think of.
You can have some Javascript in the web page that regularly (say once every few minutes) sends a small little ajax call to your server that basically just says "I'm still here". This wouldn't know immediately when they left the page, but if the server finds that the usual every few minutes ajax call didn't come, then the server can change the status of that user on that page to not there any more.
If that web page makes a webSocket or socket.io connection to the server and keeps that connection alive, then whenever the browser closes or the user closed that tab or navigates to another page, that webSocket or socket.io connection will get automatically closed and the server will be notified that the socket got closed. Using this technique, the server can know pretty much right away when the user leaves the page.

How do I capture the URL after an external website login in ReactJS?

I want to retrieve the URL after opening an external website pop up in my ReactJS/NodeJS application. Basically in my application, I have a button that redirects the page to microsoft online login page. What I want is the URL of the page after the user logs into microsoft online.
Is there any way that's possible? If so, what are my options?
If you navigate to another webpage, your React application is no longer being served to your browser, and can't do anything. You would need to have a script running on the microsoft website, either by writing it in the source code (which I doubt you can do) or by some other method such as a browser extension.
There is no way to track different systems like methods #izb mentioned, if they already dont provide.
Many systems provides information from their servers, push/ping systems.
One of the payment systems, I redirect request, customer pays, and they redirects the page I entered before in their panel, like successful or fail pages.

what happend when click mutilple links before browser display the requested page

say I open a browser window, click weather link , but the network is slow, before the server send me back anything, I click another sport link.
which page will I get eventually?
since the second httprequest may arrive the server earlier than the first one. and server will may send back the response for the second httprequest first, so my browser will display weather page instead of sport page?
since there are two response, how does browser handle them? is that possible browser dispay weather page and later dispaly sport page automatically?
See Question regarding browser behavior when a response is sent from a server for a similar question which was answered.

Resources