HTML5 cache manifest: whitelist of all deleted resources?

I am making an iPhone version on the desktop site that the blog is part of. Blogs often use images from other domains (image URLs always start with http: // in this case, obviously), but since I use the cache manifest, these images do not load because they are not declared in the manifest file.

I have a NETWORK: whitelist section that has all my AJAX request files, etc. I even included the white domains of the flickr farm because a lot of the images we add to the blog come from our flickr page. The flickr images are displayed just fine, but any other “random” hotlink images from another domain show broken ones.

I tried adding a line as follows:

Http: //

to the NETWORK: section, but it doesn't look like http: // like a whitelist.

Does anyone have any thoughts on this?

Thanks! Alex

+4
source share
2 answers

just add the “whitelist wildcard” flag to your manifest:

NETWORK: * 

which should do the trick! more details on the ws specification page

hope this helps!

+8
source

I think I have a workaround. What if you created a simple server file (remoteResource.php) that you could reference as follows:

 remoteResource.php?resource=http://somewhere.com/remote/image.jpg 

PHP (or any other server language that you use) can simply cURL in the remote resource and send it unchanged to the browser. Then select the whitelist.

I did not test this because the environment I am working with does not have cURL (ugh) installed, but I do not understand why it cannot work.

+2
source

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


All Articles