Notification API on Chrome, need a little info
up vote
0
down vote
favorite
I have been testing using the code from this demo:
https://davidwalsh.name/demo/notifications-api.php
The above Demo works on Chrome, Firefox, and Edge perfectly.
I used his demo to make an .aspx page. Basically view source copy/paste. I only added a <Form..> </Form>
so it would work in an .aspx page. When I upload to godaddy, it works in Firefox and Edge perfectly, but fails in Chrome.
Anybody suggest any reason it would not work in Chrome from godaddy? Javascript is not my thing, but I can't find anything wrong?
Would my site not having SSL keep notifications from working? Tried to google this, but it goes off on tangents that have nothing to do with this question.
Thanks,
Slight update. My .aspx page works in localhost on Chrome (IIS Express), as well (and Firefox/Edge). It only stops working when I upload to godaddy. It never even asks to allow notifications on Chrome from godaddy. Does not work if I specifically go into settings and add the URL to allow notifications
-=-=-
One last edit. This is hard to google because there seem to be a lot of similar keywords between push notifications and web notifications. I am doing web notifications and I did find this:
Also, web notification works with both non-SSL and SSL website
That blows my one big theory...unless that's outdated.
Pretty much the core code...that works everywhere except the one place I really need it to work:
Show a Notification
<script type="text/javascript">
function showNotification() {
if(window.Notification) {
Notification.requestPermission(function(status) {
console.log('Status: ', status);
var n = new Notification('Title', { body: 'I am the body text!' });
});
}
else {
alert('Your browser doesn't support notifications.');
}
}
</script>
javascript
add a comment |
up vote
0
down vote
favorite
I have been testing using the code from this demo:
https://davidwalsh.name/demo/notifications-api.php
The above Demo works on Chrome, Firefox, and Edge perfectly.
I used his demo to make an .aspx page. Basically view source copy/paste. I only added a <Form..> </Form>
so it would work in an .aspx page. When I upload to godaddy, it works in Firefox and Edge perfectly, but fails in Chrome.
Anybody suggest any reason it would not work in Chrome from godaddy? Javascript is not my thing, but I can't find anything wrong?
Would my site not having SSL keep notifications from working? Tried to google this, but it goes off on tangents that have nothing to do with this question.
Thanks,
Slight update. My .aspx page works in localhost on Chrome (IIS Express), as well (and Firefox/Edge). It only stops working when I upload to godaddy. It never even asks to allow notifications on Chrome from godaddy. Does not work if I specifically go into settings and add the URL to allow notifications
-=-=-
One last edit. This is hard to google because there seem to be a lot of similar keywords between push notifications and web notifications. I am doing web notifications and I did find this:
Also, web notification works with both non-SSL and SSL website
That blows my one big theory...unless that's outdated.
Pretty much the core code...that works everywhere except the one place I really need it to work:
Show a Notification
<script type="text/javascript">
function showNotification() {
if(window.Notification) {
Notification.requestPermission(function(status) {
console.log('Status: ', status);
var n = new Notification('Title', { body: 'I am the body text!' });
});
}
else {
alert('Your browser doesn't support notifications.');
}
}
</script>
javascript
Have you checked out caniuse.com?
– Rastalamm
Nov 7 at 17:08
2
Please put everything relevant to the question in the body of the question with an edit, not comments. Comments can be removed. Also, no one is going to visit that link, which will be dead in an internet moment. Put everything relevant to your question in as an Minimal, Complete, and Verifiable example.
– jdv
Nov 7 at 17:11
Rastalamm that's kind of neat, but it just tells me Notifications will work in Firefox, Edge, and Chrome. Already knew that. Unless they don't work in Chrome from a godaddy web server for unknown reasons. Even works locally on chrome running in IIS, so I'm thinking it is some type of vague security issue. As noted, my site does not have SSL yet.
– user1544428
Nov 7 at 18:10
Have you checked to see if you already selected "Block all notifications" from the domain?
– Forty3
Nov 7 at 18:32
Forty3 - Yes. I specifically went in and added it to the allowed domain. Thanks.
– user1544428
Nov 7 at 19:02
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have been testing using the code from this demo:
https://davidwalsh.name/demo/notifications-api.php
The above Demo works on Chrome, Firefox, and Edge perfectly.
I used his demo to make an .aspx page. Basically view source copy/paste. I only added a <Form..> </Form>
so it would work in an .aspx page. When I upload to godaddy, it works in Firefox and Edge perfectly, but fails in Chrome.
Anybody suggest any reason it would not work in Chrome from godaddy? Javascript is not my thing, but I can't find anything wrong?
Would my site not having SSL keep notifications from working? Tried to google this, but it goes off on tangents that have nothing to do with this question.
Thanks,
Slight update. My .aspx page works in localhost on Chrome (IIS Express), as well (and Firefox/Edge). It only stops working when I upload to godaddy. It never even asks to allow notifications on Chrome from godaddy. Does not work if I specifically go into settings and add the URL to allow notifications
-=-=-
One last edit. This is hard to google because there seem to be a lot of similar keywords between push notifications and web notifications. I am doing web notifications and I did find this:
Also, web notification works with both non-SSL and SSL website
That blows my one big theory...unless that's outdated.
Pretty much the core code...that works everywhere except the one place I really need it to work:
Show a Notification
<script type="text/javascript">
function showNotification() {
if(window.Notification) {
Notification.requestPermission(function(status) {
console.log('Status: ', status);
var n = new Notification('Title', { body: 'I am the body text!' });
});
}
else {
alert('Your browser doesn't support notifications.');
}
}
</script>
javascript
I have been testing using the code from this demo:
https://davidwalsh.name/demo/notifications-api.php
The above Demo works on Chrome, Firefox, and Edge perfectly.
I used his demo to make an .aspx page. Basically view source copy/paste. I only added a <Form..> </Form>
so it would work in an .aspx page. When I upload to godaddy, it works in Firefox and Edge perfectly, but fails in Chrome.
Anybody suggest any reason it would not work in Chrome from godaddy? Javascript is not my thing, but I can't find anything wrong?
Would my site not having SSL keep notifications from working? Tried to google this, but it goes off on tangents that have nothing to do with this question.
Thanks,
Slight update. My .aspx page works in localhost on Chrome (IIS Express), as well (and Firefox/Edge). It only stops working when I upload to godaddy. It never even asks to allow notifications on Chrome from godaddy. Does not work if I specifically go into settings and add the URL to allow notifications
-=-=-
One last edit. This is hard to google because there seem to be a lot of similar keywords between push notifications and web notifications. I am doing web notifications and I did find this:
Also, web notification works with both non-SSL and SSL website
That blows my one big theory...unless that's outdated.
Pretty much the core code...that works everywhere except the one place I really need it to work:
Show a Notification
<script type="text/javascript">
function showNotification() {
if(window.Notification) {
Notification.requestPermission(function(status) {
console.log('Status: ', status);
var n = new Notification('Title', { body: 'I am the body text!' });
});
}
else {
alert('Your browser doesn't support notifications.');
}
}
</script>
javascript
javascript
edited Nov 7 at 18:29
asked Nov 7 at 16:52
user1544428
1614
1614
Have you checked out caniuse.com?
– Rastalamm
Nov 7 at 17:08
2
Please put everything relevant to the question in the body of the question with an edit, not comments. Comments can be removed. Also, no one is going to visit that link, which will be dead in an internet moment. Put everything relevant to your question in as an Minimal, Complete, and Verifiable example.
– jdv
Nov 7 at 17:11
Rastalamm that's kind of neat, but it just tells me Notifications will work in Firefox, Edge, and Chrome. Already knew that. Unless they don't work in Chrome from a godaddy web server for unknown reasons. Even works locally on chrome running in IIS, so I'm thinking it is some type of vague security issue. As noted, my site does not have SSL yet.
– user1544428
Nov 7 at 18:10
Have you checked to see if you already selected "Block all notifications" from the domain?
– Forty3
Nov 7 at 18:32
Forty3 - Yes. I specifically went in and added it to the allowed domain. Thanks.
– user1544428
Nov 7 at 19:02
add a comment |
Have you checked out caniuse.com?
– Rastalamm
Nov 7 at 17:08
2
Please put everything relevant to the question in the body of the question with an edit, not comments. Comments can be removed. Also, no one is going to visit that link, which will be dead in an internet moment. Put everything relevant to your question in as an Minimal, Complete, and Verifiable example.
– jdv
Nov 7 at 17:11
Rastalamm that's kind of neat, but it just tells me Notifications will work in Firefox, Edge, and Chrome. Already knew that. Unless they don't work in Chrome from a godaddy web server for unknown reasons. Even works locally on chrome running in IIS, so I'm thinking it is some type of vague security issue. As noted, my site does not have SSL yet.
– user1544428
Nov 7 at 18:10
Have you checked to see if you already selected "Block all notifications" from the domain?
– Forty3
Nov 7 at 18:32
Forty3 - Yes. I specifically went in and added it to the allowed domain. Thanks.
– user1544428
Nov 7 at 19:02
Have you checked out caniuse.com?
– Rastalamm
Nov 7 at 17:08
Have you checked out caniuse.com?
– Rastalamm
Nov 7 at 17:08
2
2
Please put everything relevant to the question in the body of the question with an edit, not comments. Comments can be removed. Also, no one is going to visit that link, which will be dead in an internet moment. Put everything relevant to your question in as an Minimal, Complete, and Verifiable example.
– jdv
Nov 7 at 17:11
Please put everything relevant to the question in the body of the question with an edit, not comments. Comments can be removed. Also, no one is going to visit that link, which will be dead in an internet moment. Put everything relevant to your question in as an Minimal, Complete, and Verifiable example.
– jdv
Nov 7 at 17:11
Rastalamm that's kind of neat, but it just tells me Notifications will work in Firefox, Edge, and Chrome. Already knew that. Unless they don't work in Chrome from a godaddy web server for unknown reasons. Even works locally on chrome running in IIS, so I'm thinking it is some type of vague security issue. As noted, my site does not have SSL yet.
– user1544428
Nov 7 at 18:10
Rastalamm that's kind of neat, but it just tells me Notifications will work in Firefox, Edge, and Chrome. Already knew that. Unless they don't work in Chrome from a godaddy web server for unknown reasons. Even works locally on chrome running in IIS, so I'm thinking it is some type of vague security issue. As noted, my site does not have SSL yet.
– user1544428
Nov 7 at 18:10
Have you checked to see if you already selected "Block all notifications" from the domain?
– Forty3
Nov 7 at 18:32
Have you checked to see if you already selected "Block all notifications" from the domain?
– Forty3
Nov 7 at 18:32
Forty3 - Yes. I specifically went in and added it to the allowed domain. Thanks.
– user1544428
Nov 7 at 19:02
Forty3 - Yes. I specifically went in and added it to the allowed domain. Thanks.
– user1544428
Nov 7 at 19:02
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
OK, after extensive testing, it has to be an SSL issue. Despite the fact that multiple websites say "Web Notifications" -- note: not Push Notifications -- do not require SSL, I found this in another stackoverflow question:
Notification api will only work if you try running it from localhost, 127.0.0.1 or https in your domain because of security concerns. It saves a service worker file on your browser so that hackers or any man in the middle can easily hack that data if it is not encrypted via SSL. So in live websites you must have SSL certificate but on your local machine you can run this using any server.
The demo script will indeed work from localhost (IIS Express), but not from IIS on 192.168.x.x
That is very frustrating because it will work in Firefox and Edge without SSL.
Also, it is super difficult to google this because it looks like not many people use Web Notications. Most search results come back for Push Notifications, which is not what I'm using.
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
OK, after extensive testing, it has to be an SSL issue. Despite the fact that multiple websites say "Web Notifications" -- note: not Push Notifications -- do not require SSL, I found this in another stackoverflow question:
Notification api will only work if you try running it from localhost, 127.0.0.1 or https in your domain because of security concerns. It saves a service worker file on your browser so that hackers or any man in the middle can easily hack that data if it is not encrypted via SSL. So in live websites you must have SSL certificate but on your local machine you can run this using any server.
The demo script will indeed work from localhost (IIS Express), but not from IIS on 192.168.x.x
That is very frustrating because it will work in Firefox and Edge without SSL.
Also, it is super difficult to google this because it looks like not many people use Web Notications. Most search results come back for Push Notifications, which is not what I'm using.
add a comment |
up vote
0
down vote
OK, after extensive testing, it has to be an SSL issue. Despite the fact that multiple websites say "Web Notifications" -- note: not Push Notifications -- do not require SSL, I found this in another stackoverflow question:
Notification api will only work if you try running it from localhost, 127.0.0.1 or https in your domain because of security concerns. It saves a service worker file on your browser so that hackers or any man in the middle can easily hack that data if it is not encrypted via SSL. So in live websites you must have SSL certificate but on your local machine you can run this using any server.
The demo script will indeed work from localhost (IIS Express), but not from IIS on 192.168.x.x
That is very frustrating because it will work in Firefox and Edge without SSL.
Also, it is super difficult to google this because it looks like not many people use Web Notications. Most search results come back for Push Notifications, which is not what I'm using.
add a comment |
up vote
0
down vote
up vote
0
down vote
OK, after extensive testing, it has to be an SSL issue. Despite the fact that multiple websites say "Web Notifications" -- note: not Push Notifications -- do not require SSL, I found this in another stackoverflow question:
Notification api will only work if you try running it from localhost, 127.0.0.1 or https in your domain because of security concerns. It saves a service worker file on your browser so that hackers or any man in the middle can easily hack that data if it is not encrypted via SSL. So in live websites you must have SSL certificate but on your local machine you can run this using any server.
The demo script will indeed work from localhost (IIS Express), but not from IIS on 192.168.x.x
That is very frustrating because it will work in Firefox and Edge without SSL.
Also, it is super difficult to google this because it looks like not many people use Web Notications. Most search results come back for Push Notifications, which is not what I'm using.
OK, after extensive testing, it has to be an SSL issue. Despite the fact that multiple websites say "Web Notifications" -- note: not Push Notifications -- do not require SSL, I found this in another stackoverflow question:
Notification api will only work if you try running it from localhost, 127.0.0.1 or https in your domain because of security concerns. It saves a service worker file on your browser so that hackers or any man in the middle can easily hack that data if it is not encrypted via SSL. So in live websites you must have SSL certificate but on your local machine you can run this using any server.
The demo script will indeed work from localhost (IIS Express), but not from IIS on 192.168.x.x
That is very frustrating because it will work in Firefox and Edge without SSL.
Also, it is super difficult to google this because it looks like not many people use Web Notications. Most search results come back for Push Notifications, which is not what I'm using.
answered Nov 7 at 19:10
user1544428
1614
1614
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53194152%2fnotification-api-on-chrome-need-a-little-info%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Have you checked out caniuse.com?
– Rastalamm
Nov 7 at 17:08
2
Please put everything relevant to the question in the body of the question with an edit, not comments. Comments can be removed. Also, no one is going to visit that link, which will be dead in an internet moment. Put everything relevant to your question in as an Minimal, Complete, and Verifiable example.
– jdv
Nov 7 at 17:11
Rastalamm that's kind of neat, but it just tells me Notifications will work in Firefox, Edge, and Chrome. Already knew that. Unless they don't work in Chrome from a godaddy web server for unknown reasons. Even works locally on chrome running in IIS, so I'm thinking it is some type of vague security issue. As noted, my site does not have SSL yet.
– user1544428
Nov 7 at 18:10
Have you checked to see if you already selected "Block all notifications" from the domain?
– Forty3
Nov 7 at 18:32
Forty3 - Yes. I specifically went in and added it to the allowed domain. Thanks.
– user1544428
Nov 7 at 19:02