Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

JS not working properly in IE and Edge browsers

Featured Replies

Hello!

I’ve got a small JS-based music player on my homepage in its upper-left corner (just above the logo). And it works fine in all browsers, except IE and Edge. In those it shows NaN where the song’s total time is supposed to be after the page loads. But if you try to load my site in FF or Chrome, then it’s fine!

The URL as you can see is

https://apostasia.ru

1.jpg

It's worth updating the library you're using to the latest version, it looks like quite a few bugs have been patched since.

You can find the latest version on Github.

Or just remove the player.

Many people listen to music while browsing so won't want to listen to yours. Makes for a much better UX

  • Author
On 7/25/2019 at 12:05 PM, Jack said:

It's worth updating the library you're using to the latest version, it looks like quite a few bugs have been patched since.

You can find the latest version on Github.

Thanks! But you really think I have a clue how to do it? I don't even know where that file is in my Joomla tree. Nor I know how to update it.

  • Author
On 7/25/2019 at 11:14 AM, Scott MacQuoid said:

This is a known issue with Internet Explorer, and you can do one of two things

1. either bind the event handler to load the file meta separately before loading the audio file

2. create an if statement to use a different code when the visitor is on IE.. you can check here for reference

https://msdn.microsoft.com/en-us/ie/ff975061(v=vs.94)#MainContent

Thanks for your reply! But like I said to another guy in this thread who'd tried to help me, I don't have a clue about those thing. Since I'm not a programmer. I can just change the code in a file etc. Like to do a certain steps when I'm being told exactly what needs to be done.

  • Author

Here's the solution:
Solved that NaN issue in a music player! It was due to a gzip compression on the server. Had to cancel it just for mp3 files by putting this code in root's .htaccess file

<IfModule mod_headers.c>
<FilesMatch "\.mp3$">
RewriteRule ^(.*)$ $1 [NS,E=no-gzip:1,E=dont-vary:1]
</FilesMatch>
</IfModule> 

This thread can be closed now...

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.