0
votes

I'm deploy my single page on Google App Engine, when deploy for the firth time, everything go very good but now when i make some change on my web site in the images, this images not update or not make then change on my website. I see don't upload the news images. the web site works fine only when deploy for the firth time, now when make some change in my html (works fine) but when change in images don't works.

I follow the manual on Google Cloud platform, makes some change in the storage and yaml file, but nothing works.

My file app.yaml

runtime: python27 api_version: 1 threadsafe: true default_expiration: "15d"

handlers: - url: / static_files: www/index.html upload: www/index.html

  • url: /(.) static_files: www/\1 upload: www/(.)

my page is upload and works fine, but some images answer 404 error, because change the images, and right now i'dont know upgrade this images.

1
Web browsers cache images. To force a reload of your images from your site press CTRL-F5. If you use the same filename for static content, the browser will not know that you changed the file. You can control this with object cache headers.John Hanley

1 Answers

1
votes

You should keep in mind that when you apply changes in static files in Google App Engine application, these changes won’t be probably available due to cache. Even though you can try to clear your browser cache, you will not be able to clear it out of intermediate caches. As you can see in "app.yaml Reference" in Google App Engine documentation, even if you re-deploy a new version of the app, you should wait until the expiration time (normally 10 minutes by default).

Although, you can force to shorten this expiration time, by adding a Lifecycle rule in your application bucket. I write you down step by step how to do it:

  1. In your Google Cloud Console, go to Storage -> Browser
  2. Click on Lifecycle column of your application bucket
  3. Delete any rules (in case you have)
  4. Add a new rule. Choose Newer Versions and set it to 1
  5. Click Continue
  6. Select Delete and click Continue
  7. Save your new rule

Once you do this, the changes might take effect within 24 hours, although when I tried it took less than 3 minutes.

Hope this helps you!