Tools to validate HTML 5 stand-alone cache manifest?

HTML 5 includes the ability to specify how to run a web application offline . Since I am going to start creating these things, I am looking for a tool to check the syntax of file files in the offline cache . Ideally, I would run it as part of the build process.

I know that HTML 5 is still in draft, but waiting is not an option. I can write one, but I was hoping that someone had already knocked it out.

+3
source share
2 answers

I use a simple bash script to generate cache.manifest every time I create 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}
+2
source

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


All Articles