Caching All Images of a folder using html 5 - html5-appcache

I am creating an html 5 offline web application and i want to load all images from a specified folder in the server to the browser cache using html 5 cache manifest file before the first page loads.So that after the first page loads,if the internet connection goes,i can see the web application.I have searched google for an answer and it shows me to list all images in the server folder one by one in the manifest file.But that will not be possible because the website has an admin panel,using that we can upload more images.So i should have to make the cache mainifest file with some thing like this
host/images/*
But while googling,I can understand that that is not possible.
Please help me.

Finally i got an answer for my problem.I can understand that it is not possible to use html5 cachemanifest for phonegap applications.I just had a sample build in which all images are listed in the cache manifest file and nothing was cached as i expected.Then i understand that for using cache manifest,The page i am using the images,the images and the cache manifest file should be in the same domain.So that is not possible.Then i find that i can cache things in the DOM.

Related

Imagemagick integrated with Meteor

I am attempting to use Imagemagick to manipulate images that are uploaded by a user. Right now I have a simple set of Imagemagick.convert[ ] commands server side that preform a variety of tasks on the uploaded image. My problem comes from Imagemagick needing the file data to be read into meteor and not from a url. What I end up doing is writing the uploaded file to the /public folder where Imagemagick is able to manipulate the image. However because the list of Imagemagick.convert commands (saving and writing to /public), the application keeps refreshing, breaking up the processes and sending it into an infinite refreshing cycle. I don't think assets is a viable solution, but I need some folder that I can write to in meteor that will not interrupt the various Imagemagick processes through a refresh. I have tried the .folder for a hidden folder, but meteor gives me an error: "You can’t use a name that begins with a dot “.”, because these names are reserved for the system. Please choose another name." Any thoughts?
#Nate I wrote a little example app that solves this problem by using a temporary directory (as others have suggested):
https://github.com/ideaq/image-uploads
My solution gives you:
Easy image uploading in any Meteor app
Images are re-sized to Thumbnail, Mobile Optimised and Full-size Original
Images are uploaded to AWS S3 for CDN delivery (scalability and speed)
A thumbnail of the image is displayed on to the user without refreshing the page
if you found a better way of doing image uploads in meteor, please share! thanks. :-)

CMS SPIP, how to updated the file inside Squelettes directory

Heloo,
I have website that built by SPIP and already online on the internet. Since my webmaster dont work anymore with us, now I try to learning CMS SPIP.
I want to edit one of the html file, located inside this directory : httpdocs/squelettes/myfile.html. Say the name of my file is myfile.html
I changed some part of the file than upload it through fileZile. When I open my browser and refresh it, the file haven't changed yet. but it's successful upload.
please advise, do we need to configure something to upload the file.
Thank you for your help
There is a simple way to refresh a page in SPIP when you have caching issues : pressing the Reprocess page button on the public site (as said by Serge) or adding ?var_mode=recalcul as a parameter of your URL.
I think the matter is in website cache. SPIP is hard caching HTML and images.
Try to clean cache via private area (under Maintenance button in SPIP 3) or press "Reprocess page" button on the front-end.
With your FTP connection go to the SPIP root directory, then find the /tmp directory open it and clear\empty the /cache directory inside it. This directory contains temporary files & cache files.

Cache Manifest with ASP.NET MVC Downloads Correctly, But Site Still Unavailable Offline

I'm working on an ASP.NET MVC web page that I would like to have available offline. I created a Cache Manifest file and included it as follows:
<html lang="en" manifest="/cache.manifest" type="text/cache-manifest">
(I included the "type" attribute because of Paul Styles' answer found here.)
The page I'm trying to cache is managed by the OfflineController.cs controller. The cache.manifest file itself reads as:
CACHE MANIFEST
# rev 5
NETWORK:
*
CACHE:
/offline
(I used this syntax for the paths because of ZippyV's answer found here.)
When I change the revision number and reload the page, the console shows:
Document was loaded from Application Cache with manifest https://[...]
Application Cache Checking event
Application Cache Downloading event
Application Cache Progress event (0 of 8) [...]
[...]
Application Cache UpdateReady event
This seems to mean that the manifest file was loaded correctly. Furthermore, when I Inspect the page and view Resources > Application Cache > cache.manifest, all 8 files are shown to have been downloaded.
However, when I unplug my Ethernet cable and navigate to ~/offline, the site does not load. Any ideas why? Thanks!
Was this error ever fixed? I realize that this was asked quite a while ago.
Update:
Hopefully this helps anyone else who come across this, this sound like a similar issue.

How can i turn a local website (directory on my PC) stored in a filder into a .webarchive file?

I have a full website html, css, images, javascripts and video on my local hardrive all contained in a folder.
the website works great on my PC but i need to transfer it to an iPad, i was thinking that this should be easy ... well its not since i cant just copy the site over and run it like on my PC.
so my next step was to try and make a .webarchive of the site but since it has a lot of jquery and video files i cant just use safari since it wont include any of the video files and so on.
was hoping someone knows of a tool or a method to convert a folder into a webarchive.
Just open the website over safari and then Save As... web archive.
My currently unsolved issue is exactly the reverse one.

HTML5 offline capabilities in a sub directory

I'm trying to setup a iPad app to work offline. I was able to successfully get it to work but I was told to put the app in multiple sub directories. When I did this and update the cache manifest file to the new destinations of all the files I kept getting an error that the site wouldn't work because it wasn't connected to the internet. I tried multiple paths and looked up different ideas but have come up empty handed. Is their a way to get offline mode working with a site inside sub directories?
Thanks.
This shouldn't make a difference. Make sure all urls in the manifest are relative and always end the manifest with:
NETWORK:
*
Furthermore make sure you don't forget to add any images, libraries etc. from the cached url's to the manifest. Sometimes even caps can make a difference. OPen the console of the developer tools in Chrome to see what's being cached and what breaks loading the appcache.
Also make sure there are no iframes (ie. like-buttons) on the homepage(page that includes the manifest attribute in the html-tag) which is always cached.
Little trick:
If you want to fallback you're homepage place the manifest attribute in an invisible iframe on the homepage of your app.
That way you have total control over what's cached and what not.

Resources