Opera Cross Domain Error
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the cannot load m3u8 crossdomain access denied company Business Learn more about hiring developers or posting ads with us Stack Overflow
Cross Domain Access Denied Chrome
Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 cannot load m3u8 crossdomain access denied chrome million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up using jQuery's ajax in Opera(cross domain request) up vote 2 down vote favorite I don't know if it is crossdomain access denied error #2048 a bug in Opera, but it is really strange behavior. When I use jQuery's ajax to send a request, Opera will say "No transport" error. I notice that this is a cross domain request and opera prohibits this. So how can I change this situation in Jquery? jquery ajax cross-domain opera share|improve this question asked Nov 8 '11 at 6:55 xiaohan2012 2,13783570 As far as I know, Opera doesnt support Cross
Access-control-allow-origin Multiple Domains
domain request. userscripts.org/topics/2026 –Nikhil Ben Kuruvilla Nov 8 '11 at 7:12 add a comment| 1 Answer 1 active oldest votes up vote 4 down vote accepted Opera doesn't support cross-origin XMLHttpRequests yet. You can either use JSONP (if you control the origin server for the data or they have a JSONP option) or detect the "no transport" error and show an error message to the website visitor. Opera 12 should support what you need, but try to avoid using browser detection to show the "not supported" message. share|improve this answer answered Nov 8 '11 at 12:50 hallvors 5,14311333 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email and Password Post as a guest Name Email Post as a guest Name Email discard By posting your answer, you agree to the privacy policy and terms of service. Not the answer you're looking for? Browse other questions tagged jquery ajax cross-domain opera or ask your own question. asked 4 years ago viewed 1102 times active 4 years ago Related 434How do I send a cross-domain POST request via JavaScript?1302Abort Ajax requests using jQuery337jQuery AJAX cross domain1Focus with Cross-domain Ajax in Opera14Cross-origin Ajax requests don't work in Opera and IE9?3How can
outside the domain from which the resource originated.[1] A web page may freely embed images, stylesheets, scripts, iframes, videos.[2] Certain "cross-domain" requests, notably AJAX requests, however are forbidden by default cannot load m3u8 crossdomain access denied 2048 by the same-origin security policy. CORS defines a way in which a browser cannot load m3u8 crossdomain access denied jwplayer and server can interact to determine whether or not it is safe to allow the cross-origin request.[3] It allows for
Cross Origin Resource Sharing
more freedom and functionality than purely same-origin requests, but is more secure than simply allowing all cross-origin requests. It is a recommended standard of the W3C.[4] Contents 1 How CORS works 2 http://stackoverflow.com/questions/8046900/using-jquerys-ajax-in-operacross-domain-request Simple example 3 Preflight example 4 Headers 4.1 Request headers 4.2 Response headers 5 Browser support 6 History 7 CORS vs JSONP 8 See also 9 References 10 External links How CORS works[edit] The CORS standard describes new HTTP headers which provide browsers and servers a way to request remote URLs only when they have permission. Although some validation and authorization can be performed https://en.wikipedia.org/wiki/Cross-origin_resource_sharing by the server, it is generally the browser's responsibility to support these headers and honor the restrictions they impose. For AJAX and HTTP request methods that can modify data (usually HTTP methods other than GET, or for POST usage with certain MIME types), the specification mandates that browsers "preflight" the request, soliciting supported methods from the server with an HTTP OPTIONS request method, and then, upon "approval" from the server, sending the actual request with the actual HTTP request method. Servers can also notify clients whether "credentials" (including Cookies and HTTP Authentication data) should be sent with requests.[5] Simple example[edit] This is generally not appropriate when using the same-origin security policy. When a CORS-compatible browser attempts to make a cross-origin request: The browser sends the OPTIONS request with an Origin HTTP header. The value of this header is the domain that served the parent page. When a page from http://www.example.com attempts to access a user's data in service.example.com, the following request header would be sent to service.example.com: Origin: http://www.example.com The server at service.example.com may respond with: An Access-Control-Allow-Origin (ACAO) header in its response indicating which origin sites are allowed. For example: Access-Control-Allow-Origi
the problem is with us using multiple browsers or we trying to fetch data from other domains (pun intended), nevertheless, we run into the issues while getting our data from the http://thejackalofjavascript.com/cross-domain-ajax-with-cross-browser-support/ source. In today's AJAX driven world, nobody wants to see their page refreshed, everything needs to happen "under the hood". Hence we run into issues like this! So how do we go about it? Lets first get an understanding on what exactly is happening What is a Cross Domain Request? Requesting a piece of content from another domain Ex: www.google.com loads the logo (image) from www.facebook.com What is the problem with that? For access denied starters, One can fetch a content from another (reputed) domain, modify it and show it differently on their own domain One can fill a login form and post it to another domain claiming to be a valid user of the later Oh my god! Wat do I do now?? Well we can understand how the browser handles such issues and how do we implement them. So, the Web application working domain access denied group within W3C came up with a rule/policy that no resource across origins can be fetched without the consciences of the source parties. This is called as a CORS policy. You ask "Ok, nice.. So how do I fetch resources across domains??".. The Solution There are 2 parts to our CORS The Server The Client The Server If the server dispatches a CORS response header like Access-Control-Allow-Origin: * the client/browser which is requesting the resource will load it. Did you notice the *? Yes, that means any one can access the specified resource. Oh! is that a problem? Then lets look at a variation Access-Control-Allow-Origin: http://www.thejackalofjavascript.com/ This will restrict the access of the content to the domain thejackalofjavascript. Neat right? So what all can you restrict? Access-Control-Allow-Credentials Response Header Access-Control-Expose-Headers Response Header Access-Control-Max-Age Response Header Access-Control-Allow-Methods Response Header Access-Control-Allow-Headers Response Header Behind the scenes Source Below is an example of how we can set a Response header in PHP: Now, The Client - Using AJAX (A Cross Domain AJAX) This is where it gets all tricky and mixed up. We have friends everywhere, Microsoft, Mozilla, Google etc. So we need to come up with a solution that supports all. Lets see who all supports the CORS Hmm.. So we kind of need a generic