2
votes

I am using the erlang cowboy webserver serving a simple index.html file with javascript embedded.

Everything is working but when I make changes to the index.html file on the server and refresh the browser the updates are not loaded. I have disabled chrome cache and still have the issue.

If I restart the cowboy server all is well and the updates are present after a browser refresh.

My question is - does cowboy cache the files it serves to clients? If so is there a way to temporarily stop this to make code development more convenient OR maybe there is a better way to force updates?

1

1 Answers

1
votes

I realised whats going on.

When the application is compiled the 'priv' directory is copied to a different location.

I am using the eventsource example from the cowboy release. The priv directory is copied to:

/_rel/eventsource_example/lib/eventsource-1/priv

The files are served from there.