Is Opera Turbo on?

I have a page that uses Flash with animation (this is not important, but additionally).

Everything works fine if I don't use Opera with Turbo activated. Flash Movie is then displayed as a big ugly arrow in a circle the size of a flash movie that is designed to play as the play button for the flash.

I use SWFobject, so I could easily turn on the animation if I knew that if the turbo mechanism of Opera is used, but how to do it in JavaScript (or maybe CSS if that happens)


How to reproduce?
Browse this page using Opera (or any other page using flash)
http://www.adobe.com/software/flash/about/
Without Opera Turbo, you will see information about flash animations and flash versions. With Opera Turbo, you see two white arrows in gray circles


edit 1 Now I’m quite sure that there is no pure JS solution, not a PHP solution. The best guess is the AS / JS combination solution.

+4
source share
3 answers

You can check if the flash object is loaded with some javascript. This code works on my computer with Opera 11:

<html> <head> <script language=JavaScript> function isFlashBlocked(){ var blocked; try { // Can test this on any flash object on the page window.document.myFlash.SetVariable("dummy", "dummy"); // Flash not blocked blocked = false; } catch(err) { // Flash blocked blocked = true; } return blocked; } function removeBlockedFlash() { if (isFlashBlocked()) { // Hide all flash objects window.document.myFlash.setAttribute("style", "display: none"); // ... // Display replacement content window.document.myImage.setAttribute("style", "display: inline"); // ... } } </script> </head> <body onload="removeBlockedFlash()"> <object type="application/x-shockwave-flash" data="HelloWorld.swf" width="100" height="100" id="myFlash"> </object> <img src="image.jpg" style="display: none" id="myImage" /> </body> </html> 

If you find that the flash is blocked, you hide every flash object and show what you want.

Edit: this code does not work with Firefox, you probably need to detect a browser before using this feature.

+2
source

Client Side Discovery : Unable to access this through javascript. Finding a client side for an operational turbo is currently not possible, it may be supported in the future, but who knows?

Server-side detection : When opera turbo is turned on, all requests from the client are made to operational servers, operational servers will access your application (do compression) and redirect the processed content to the final client (user computer).

With that in mind, let's sniff the network a bit and see where your connection will be:

 ~$ nslookup opera10beta-turbo.opera-mini.net >Server: 189.40.226.80 >Address: 189.40.226.80#53 >Non-authoritative answer: >opera10beta-turbo.opera-mini.net canonical name = global-turbo-1.opera-mini.net. >Name: global-turbo-1.opera-mini.net >Address: 141.0.11.252 ~$ nslookup 64.255.180.252 >Server: 192.168.1.254 >Address: 192.168.1.254#53 >Non-authoritative answer: >252.180.255.64.in-addr.arpa canonical name = 252.0-24.180.255.64.in-addr.arpa. >252.0-24.180.255.64.in-addr.arpa name = global-turbo-1-lvs-usa.opera-mini.net. 

As you can see, the name and canonical name of the operating servers can be used to determine if your application is running through the operating servers. I think server-side coding can handle this (not sure which language you use on your server).

It’s good to remember that Opera Turbo will not interfere with your requests if you access something on your local server.

Hope this helps.

+5
source

I believe the answer to the question about speed is that Flash content does not load initially. You need to manually click the icon to download it. The same goes for animated GIFs. This is part of a speed improvement strategy. (See this post for the Opera Desktop team .)

That's why you want to know how to check Opera Turbo, not just Opera. From my local tests, I cannot tell the difference using the PHP variable _SERVER ["HTTP_USER_AGENT"]. I think it looks like Opera is a user agent string, as shown here and.

It seems that by notifying the website about the state of the browser, Opera silently manages the query results in different ways.

+2
source

Source: https://habr.com/ru/post/1390399/


All Articles