Reputation: 108899
HTML 5 includes the ability to specify how to run the web application offline. As I'm about to start authoring these things, I'm looking for a tool to validate the syntax of the offline cache manifest files. Ideally, I'd run it as part of the build process.
I'm aware HTML 5 is still in draft, but waiting isn't an option. I may write one, but I was hoping someone had knocked one out already.
Upvotes: 3
Views: 1025
Reputation: 21171
Check out http://manifest-validator.com/. You can upload or link to your manifest file and it will validate it for you.
Upvotes: 2
Reputation: 21
I use the simple bash script to generate cache.manifest each time I build my application:
#!/bin/bash
MANIFEST_FILE="cache.manifest"
echo "CACHE MANIFEST" > ${MANIFEST_FILE}
echo "#Created at `date -Ru`" >> ${MANIFEST_FILE}
echo "" >> ${MANIFEST_FILE}
echo "CACHE:" >> ${MANIFEST_FILE}
find . -type f | cut -c 2- | grep -v '^[[:space:]]*$' | grep -v '^/cache.manifest$' >> ${MANIFEST_FILE}
echo "" >> ${MANIFEST_FILE}
echo "NETWORK:" >> ${MANIFEST_FILE}
echo "/api" >> ${MANIFEST_FILE}
Upvotes: 2