HTML5 audio with a HTTP 302 redirect in Chrome - http

I am trying to write an HTML 5 based last.fm player using the popular jPlayer jQuery plugin (http://jplayer.org).
The player works fine in Firefox. However I ran into a problem:
From the last.fm API (http://last.fm/api) I get a playlist with urls to the files. When requesting one of these, last.fm does a HTTP 302 redirect from play.last.fm to something like "http://s03.last.fm/someurl/128.mp3".
It looks like there is some same origin policy for html 5 tags, because jPlayer is unable to play the file in Chrome and Chromium. If jPlayer uses the flash solution (using "flash, html" instead of "html, flash"), everything works fine.
I installed the extra codecs on my Ubuntu and mp3 playback works nicely for the jPlayer demos.
HEAD requests are not supported by the streaming servers. I already tried to do a normal GET request and then tried to get the "Location" header of the xmlhttprequest, but it fails with a security error.
You can find the sources of my (proof of concept) project at https://github.com/tburny/html5-lastfm-player
Is there any hint/solution to this problem?

i had a similar problem but only on android browser. there are lots of gotchas. the key question is if either the original url which gives 302 and the end one is https? if so it'll fail.
check out this test suite http://areweplayingyet.org/

Related

Simulating a crawler on my website

I need to debug my web app which is written by asp.net to find out how it is acting when rendering the content for the crawlers like Googlebot. The first thing I found was some online/offline tools but none of them can pass the Request.Browser.IsCrawler flag.
Then I tried to simulate a handmade request adding the Googlebot UserAgent but still no chance.
I used Telerik Fidler and Chrome while setting User-Agent to Googlebot/2.1 (+http://www.googlebot.com/bot.html), including _escaped_fragment_ in the URI and successfully saw the page from crawler perspective.

some CSS can not show when swith the website from http to https

I have a website written in Ruby using Ruby on Rail framwork, everything was fine when using HTTP protocol, but when switching to HTTPS protocol.
Some CSS material can not shown, but some of it can.
The font can not be shown, originally the font was designed, but now it is not.
Anyone know what happen?
Without any specific error I assume browser is probably blocking files loading from mixed content, i.e. using both HTTP and HTTPS. Use your browser developer tools network tab to confirm this.
You can use // instead of http:// so that resources load from the relative protocol that the page content is loading from; Can I change all my http:// links to just //?
Also read; How to fix a website with blocked mixed content

Web font not working online. but working locally

I'm trying to work on my website but for some reason the web fonts are not working, even though they work fine on my local machine
please have a look on my css codes. its up on github.
css style code
https://github.com/AlexFTWW/alexftww/blob/gh-pages/css/style.css
website
https://alexftww.github.io/alexftww/
and it should look like this. much thinner
http: //prntscr.com/45krlw
on chrome console
[blocked] The page at 'https://alexftww.github.io/alexftww/' was loaded over HTTPS, but ran insecure content from 'http://fonts.googleapis.com/css?family=Roboto:100,100italic,300,300italic,400,400italic': this content should also be loaded over HTTPS.
just change the url to:
https://fonts.googleapis.com/css?family=Roboto:100,100italic,300,300italic,400,400italic
note: the website use a secure protocol (https) , the external resources wold be loaded using https protocol

What can be preventing this cdn file from loading on my webpage?

I wish I had a more generic way of asking this question but I really can't figure out what could be going on.
Using dev-channel Chrome 26 (and IE 10) I'm hitting a simple html site in my public dropbox here
In my browser Handlebars.js (from cdnjs.com) never loads and I get an error. Heck, according to the Network tab it never even tries to load it. Yet click through the source and the script file - it is definitely a live link. Why handlebars? Additionally, running the same exact site with a local server loads just fine.
I'm at a loss here what could possibly have this effect. You'd think the issue would be running the server in dropbox but it seems to be the actual browser misbehaving. And why on earth does it not make any request at all?
My repo by the way is on github on the preformance-tuning branch
It looks like Chrome is throwing an insecure content warning on your scripts. Most likely because you are trying to access content hosted over HTTP while your site is being served from dropbox using ssl. Most likely a Chrome security setting silently block scripts it considers "insecure"

Flex file upload issue io error #2038 over HTTPS

Hi i have a flex file upload application over https it works fine on all IE browsers.
Recently a client with IE9 reported a complaint that she's not able to upload files.
I can see the error generated is IO Error #2038.
The adobe documentation says 2038 is File I/O Error.This error occurs when an application can't get file size, creation date or modification data using the FileReference API.
Can some one help me point out what could be the issue here.
All i can think of is browser issues like, browser cache, some new configuration in IE9 am unaware of or permission on the client directory.
Help will be much appreciated.
thanks
I suggest you to use Charles debugging proxy, which is must have tool for all Flash/Flex developers, and see the difference in IE8 and IE9. Maybe the problem is in some HTTP headers or something else.
I have a similar issue. Later I found out that upload feature doesn't work for latest version of flash player over https. Then I tried sending the upload requests via http instead of https. Now its working fine. Try this, it may help in your case aswell.

Resources