Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Images aren't included in the manifest.appcache file #760

Closed
joacim-boive opened this Issue · 5 comments

5 participants

@joacim-boive

I've enabled the creation of the .appcache file.

I run: ant build

Using the latest version: V2.0 August 10th

project.properties:

file.stylesheets =
file.pages =
file.manifest = manifest.appcache
file.exclude =
env =

Generates this manifest.appcache:
CACHE MANIFEST

version 2011-09-14 18:44:17

CACHE:
404.html
index.html

css files
css/9c2b99ccd95c19411ed9a542236d5970e23ac948.css

js files
js/3e4a0570feac8632f7823bd6ef29b66760b9defd.js
js/libs/modernizr-2.0.6.min.js
js/libs/jquery-1.6.2.min.js

FALLBACK:

NETWORK:
*

I have the .png files in my img-folder. None of which are included in the above file.

Thanks!

/J

@philipvonbargen

Images are not included, because they are cached for 1 month by default via .htaccess. If you need a longer timespan I would recommend to increase that value or to manually add the images to the manifest.appcache template in the build/conf folder.

@gmoulin

not the same use, images cached via .htaccess are still requested to the server
on the other hand the images listed in the manifest file are requested only once by the client

@philipvonbargen

I just checked and you're right. So you guys just ignore the first part of my previous comment ;)

@paulirish
Owner

yup we should def do this. looks like gmoulin's update in #667 doesnt tackle this either
but we def need image support in the manifest generation

@gmoulin

In my patch, to support images you can : (not tested)

add a line "#image files" in the manifest "template" file
and remove any line with images

then in build.xml near line 690 add :

<for param="file">
    <path>
        <fileset dir="./${dir.publish}/img/">
            <include name="**/*.png"/>
            <include name="**/*.jpg"/>
            <include name="**/*.gif"/>
        </fileset>
    </path>
    <sequential>
        <basename property="filename.@{file}" file="@{file}" />
        <replaceregexp match="# image files" replace="# image files${line.separator}img/${filename.@{file}}" file="${dir.intermediate}/${file.manifest}" />
    </sequential>
</for>

It will add any jpg, png and gif from the img directory to the manifest file.

@nimbupani nimbupani closed this in 90734c0
@dustinwhittle dustinwhittle referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
@moimikey moimikey referenced this issue from a commit in moimikey/html5-boilerplate
Divya Manian Adding all images in the img folder to the manifest. Fixes #760 d26824c
@roblarsen roblarsen referenced this issue from a commit in roblarsen/html5-boilerplate
Divya Manian Adding all images in the img folder to the manifest. Fixes #760 9460748
@gigafied gigafied referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
@sengeezer sengeezer referenced this issue from a commit in sengeezer/html5-boilerplate
Divya Manian Adding all images in the img folder to the manifest. Fixes #760 5f8595e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.