0

I have a single page app written in node.js which has a fair amount of javascript and css.

now is it possible to load the offline version of webpage as soon as the url is entered and at the same time send the request to server and wait for response while the offline version is showing a nice splash screen?
in other words, instead of waiting for the response from server and then render the application, I prefer that browser would render the app while the request is being sent.
this way the page is loaded instantly(with the splash page) and the time that requests are being sent and responses are being returned, the javascript and css is being loaded which saves some time. is this possible with modern technologies? and is it even a good idea?

Mohsen Shakiba
  • 1,762
  • 3
  • 22
  • 41
  • `html5-appcache` the tag that you have used already! – Vishwanath Apr 13 '15 at 16:07
  • yes but it only works if there is no internet connection, I want it to load with appcache when there is internet conection – Mohsen Shakiba Apr 13 '15 at 19:37
  • After first download of files in your appcache, next time browser only checks for the appcache file for updates even when you are connected. So what you want is already happening. If I am misunderstanding, please elaborate... – Vishwanath Apr 15 '15 at 04:57
  • yes, but it checks for updates before rendering the page, right? and that might take a few hundred milliseconds in a slow connection, correct? – Mohsen Shakiba Apr 16 '15 at 05:12
  • It only checks for the appcache file for updates, and if that gets not modified. No more Downloading occurs. Why is this is not good enough for you. Won't u want to have updates in future? – Vishwanath Apr 16 '15 at 05:15
  • first of all,let me thank you for taking the time to answer my questions, it's because I want it to be super fast on mobile devices, so loading seem instantly to the user. but I guess it's not gonna happen. – Mohsen Shakiba Apr 16 '15 at 06:25

0 Answers0