appcache不再工作 - 不加載離線

[英]appcache not working any more - not loading offline


I have tested my website thoroughly offline (just using localhost). And I have never had a problem with appcache - such that I could load my website, disconnect my phone from the wi-fi, reload the website and I could still view it.

我已經徹底脫機測試了我的網站(只使用localhost)。我從來沒有遇到appcache的問題 - 這樣我就可以加載我的網站,斷開我的手機與Wi-Fi的連接,重新加載網站,我仍然可以查看它。

Now I have put my website online (ie. http://subdomain.example.com) - the code is exactly the same - and I try the same thing.

現在我把我的網站放在網上(即http://subdomain.example.com) - 代碼完全一樣 - 我嘗試了同樣的事情。

It will just not work. Chrome on my phone says wi-fi and mobile are unavailable and the page can't be loaded.

它將無法正常工作。我的手機上的Chrome說Wi-Fi和手機不可用,無法加載頁面。

I just don't understand. Is there anything that anyone can think of that is different about working locally to working on a remote server?

我只是不明白。有沒有人能想到在本地工作到遠程服務器上有什么不同?

1 个解决方案

#1


If anyone else has this problem in the future, check your paths in .appcache

如果其他人將來遇到此問題,請檢查.appcache中的路徑

In turned out that the change between local and online (ie. 10.0.0.10/myapp/Symfony/mobile vs subdomain.example.com) meant that the / I had in the first line of my manifest was pointing to different locations on both local and online.

事實證明,本地和在線之間的變化(即10.0.0.10/myapp/Symfony/mobile vs subdomain.example.com)意味着我在清單第一行中的/我指向本地和本地的不同位置和在線。


注意!

本站翻译的文章,版权归属于本站,未经许可禁止转摘,转摘请注明本文地址:https://www.itdaan.com/blog/2015/05/04/72fbfe3637a2a7899a6cb314fe5b406f.html



 
粤ICP备14056181号  © 2014-2021 ITdaan.com