Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Working with appcache manifest with NW #2797

Closed
Kureev opened this issue Dec 14, 2014 · 2 comments
Closed

Working with appcache manifest with NW #2797

Kureev opened this issue Dec 14, 2014 · 2 comments

Comments

@Kureev
Copy link

Kureev commented Dec 14, 2014

Hi all,

I have an application with a lot of big images (400-500Kb), and I want to cache them with NW to prevent them load every time. I placed a manifest file on my VPS, setup all headers and etc, but when i'm using

<html lang="en" manifest="http://178.62.254.181/prayer.manifest">

In NW, i don't see anything changed on Resource tab in DevTools. If I create an index.html file on the server and specify those manifest file - it works. Can you tell me what i'm doing wrong?

UPD: If I upload index.html to the server, than cache works fine. But i'd like not to do it. Of course, i assume that on start i can create custom server in node part, but it's strange that i can't serve manifest file without those workaround.

UPD 2: In fact, it's impossible to properly use appcache in NW applications. If you point to remote resource for index.html with manifest specified, you lose any possibility to use node-webkit's dual scope, i.e. you can evaluate only window-scope expressions. Otherwise, appcache manifest isn't loaded.

@tommoor
Copy link

tommoor commented Dec 16, 2014

@Kureev you can use app cache when loading remotely. You need to also add the node-remote attribute to the manifest file if you wish to access dual scope on a remote page.

@Kureev
Copy link
Author

Kureev commented Dec 16, 2014

@tommoor Thanks a lot, I think it should help. So in fact, I should run local server and serve all files thru it with enabled node-remote in my node-webkit manifest file, right? I'll try it and resolve this issue if it'll help.

@Kureev Kureev closed this as completed Dec 17, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants