Jorge Sampayo
Jorge Sampayo

Reputation: 868

IE10 caches page

I have a website that shows a preview of an image when the user add some caption to it.

The flow is:

  1. User see the /new page
  2. It submits the caption (create), User is redirected to the /edit page (to see the preview)
  3. If there are changes it submits again (update), User is redirected to the /edit page
  4. When he is satisfied, he closes the page.

Everything works fine except in IE10, it creates the image with the caption on the server, but it shows the old image when he is redirected to /edit, after a F5 it shows the data from the server.

So, I think it is caching the page. Chrome, Safari and Firefox work fine.

I'm working on Ruby on Rails.

Anyone knows a workfix?

Upvotes: 0

Views: 99

Answers (1)

ema
ema

Reputation: 5773

Try to add this meta as the first element inside HEAD

<META HTTP-EQUIV="Pragma" CONTENT="no-cache">

Another option is to add a param to your url:

<IMG SRC="myimage.png?fuckIe=12345" />

Where 12345 change on every request

Upvotes: 1

Related Questions