Quick and dirty HTML5 offline cache generator

abril 13th, 2012 § 0 comments

#!/bin/bash

echo "CACHE MANIFEST"
echo "#Generated: $(date)"
echo "CACHE:"
echo "/"
find . -type f |
while read i; do
if [ "${i:2}" != "$(basename $0)" ]; then
if [[ $i == \./* ]]; then
echo "${i:2}"
else
echo $i
fi
fi
done
echo "NETWORK:"
echo "*"

 

Remind the following:

  • Read a trustable source of information: html5rocks
  • Follow tips from appcachefacts.info
  • When serving your cache manifest file (could be any name, but the extension .appcache is recommended) use the content type:  text/cache-manifest

Tagged , , ,

Deja un comentario

Tu dirección de correo electrónico no será publicada. Los campos necesarios están marcados *


× 4 = veinte ocho

Puedes usar las siguientes etiquetas y atributos HTML: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

*
To prove you're a person (not a spam script), type the answer to the math equation shown in the picture. Click on the picture to hear an audio file of the equation.
Click to hear an audio file of the anti-spam equation

What's this?

You are currently reading Quick and dirty HTML5 offline cache generator at arde en el infierno.

meta