How does this site (allaboutrajni) work only when disconnected? (disconnect from the Internet)

The following site only works offline. Link

So how do they do it?

I even saw Youtube doing something similar. just open YouTube and disconnect the network and update it. You will see the page below.

enter image description here

+7
source share
4 answers

HTML5 allows web pages to work autonomously,

  • Providing storage in terms of localStorage and sessionStorage .
  • Providing events to tell the page when it is online / offline
  • The navigation.onLine property is a boolean that lets you know whether you are online or not.
  • Providing application caches.

Thus, both pages store assets that should work offline on any of these media, and checks whether it is online or offline when the page loads.

For more information, you can see http://www.html5rocks.com/en/features/offline

EDIT: Fur, index the site you linked to, works by downloading flash content, and then ping http://images.desimartini.com/allaboutrajni/config.xml every second to determine if it is all connected to the Internet. This site will not load if you disable and refresh the page.

However, a page using true autonomous functionality is, for example, http://htmlfive.appspot.com/static/stickies.html

+7
source

this, as you can see, is basically the whole site embedded in flash. therefore, when you click on the URL, the entire site in flash memory is loaded into the client’s browser, and therefore no more Internet connection is required to launch the site. You can also check the Internet connection using the script action as indicated here and allow access to the user only if the network is disconnected.

0
source

I think that http://www.desimartini.com/allaboutrajni.htm works offline, because its flash is on and so, when you visit the site for the first time, the flash is loaded and can be launched subsequently without an Internet connection. To prove this, turn off your Internet before visiting the site, you will notice that it does not load. Secondly, youtube works because it has Google and you use Google Chrome to view it. Google Chrome needs to add custom code to its browser to detect when users try to browse YouTube without an internet connection.

0
source

I did this before using PHP. Basically create a bootloader, than find a file called check.php, than in your loader class, create an if file. in your php or text file just add the variable onlineChecker = ok if someone downloads your flash movie, it’s still difficult to watch, because they don’t have a verification file on their PC or they know that it exists and it destroys them .

 var onlineChecker = "" var myRequest:URLRequest = new URLRequest("test.php"); var myLoader = new URLLoader(); myLoader.addEventListener(Event.COMPLETE, onload); myLoader.load(myRequest); function onload(){ if(onlinechecker == ok){ // well now we are not going to load nothing or continue. else{ gotoAndPlay(whatever); } } 
0
source

All Articles