5

I'm using rackspace to host my image files that are drawn on an html5 canvas object. Because of an HTML security feature when saving a canvas I have to use CORS (Cross Origin Resource Headers) to make save work.

I have tested my code on Chrome, IE with Chrome Frame, and Firefox, and none of them give me a security error after I added to the image request headers:

Access-Control-Allow-Origin: * 

and I have added the following attribute to all the images drawn on to the canvas

crossOrigin = "anonymous"

However, for some reason Safari still gives a security error.

SECURITY_ERR: DOM Exception 18: An attempt was made to break through the security policy of the user agent.

Any thoughts as to why this is happening on safari(desktop 5.1.7, and ipad) versions? I have checked the documentation and everything I have read says that Safari 4+ supports CORS?

John
  • 4,362
  • 5
  • 32
  • 50

1 Answers1

2

Safari 5.2 in beta solves the problem. So it looks like Safari does not yet support cors for images in released versions. The same goes for iOS safari

John
  • 4,362
  • 5
  • 32
  • 50
  • `Safari 5.2 in beta solves the problem` where did you get this information? I couldn't find it from internet. – Ikrom Sep 10 '14 at 11:39
  • @bob This is from 2012 but 5.2 was never released and instead repackaged as safari 6 I believe. – John Sep 10 '14 at 22:36