Skip to content

File timestamp of generated preload file is wrong #14

@Frank683

Description

@Frank683

Since the target preload file is created with

var preloadFile = firstFile.clone({contents: false});

all file attributes including creation and modification timestamps are cloned from the firstFile which is the first file coming out of the stream.

This leads to subsequent problems when creating e.g. a sap-ui-cachebuster-info.json file.
When the firstFile has not been changed for a long time the Component-preload.js will be listed in the cachebuster file with the old timestamp of the firstFile which will lead to clients loading the outdated version of Component-preload.js from the browser cache despite a newer version being available on the server.

Since this repo is not maintained anymore I just want to report this for any others who might face this problem in the future.

I will try to find a workaround by manually setting the modification date of Component-preload.js after it has been created in my gulp build script.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions