phpBMS

Ticket #39 (closed defect: fixed)

Opened 5 years ago

Last modified 2 years ago

Browser cache problem for reports

Reported by: ZGAnderson Owned by: ZGAnderson
Priority: minor Milestone: 0.7
Component: phpbms Version: 0.62
Keywords: obsniQlTvApl Cc:

Description

Some browsers use the cache for the pdf reports even if the report has changed, because the report link doesn't change.

Attachments

print.php.diff Download (1.3 KB) - added by ZGAnderson 5 years ago.
print.php.2.diff Download (0.8 KB) - added by ZGAnderson 5 years ago.
revised with date

Change History

Changed 5 years ago by ZGAnderson

  Changed 5 years ago by ZGAnderson

Submitted a diff based on code found in the Sourceforge forum.

 http://sourceforge.net/forum/message.php?msg_id=3679834

The change simply adds a random number to the end of the file. This fix was tested to resolve the issue in Firefox 1.5.0.7 only.

(I used the trunk version of the file, and the -c option on diff. Hope I got it right this time!)

  Changed 5 years ago by jceh

The bug doesn't seem to occur in Firefox 1.5.0.7, but IE6 does seem to cache the pdf when attempting to print.

  Changed 5 years ago by brieb

The random number is a great idea, and it doesn't seem to be a problem with a specific browser, but rather cache settings. Couple of things:

1.) A better number to append would be the unix timestamp, as it would pretty much insure no repeat in the numbers.

2.) The fake for IE extension needs to come last. IE needs to see the extension at the end of the URL to know it is opening a PDF file, as it tends to disreguard(sp?) mime types passed in the header. (Stoopid IE)

  Changed 5 years ago by mipalmer

haha, ok ZGAnderson. You can curse me now. You just taught me how to do it the *real way* without the help of subclipse as my crutch. I should have known this.

Here is the *real* way of doing this. svn diff print.php > print.php.diff

What this does is takes your modified file and compaires it with HEAD in svn, then pipes the differences to that file name specified.

 http://svnbook.red-bean.com/en/1.0/svn-book.html#svn-ch-9-sect-1.2-re-diff

Sorry. I take credit for telling you the wrong thing as you did my instructions flawlessly. I will update the instructions on how to do this now.

-Mike

  Changed 5 years ago by ZGAnderson

Ok, I'll resubmit with the fake IE extension last and using a timestamp. Makes sense to me.

Plus this will give me a chance to use the svn diff ;)

Changed 5 years ago by ZGAnderson

revised with date

  Changed 5 years ago by brieb

  • status changed from new to closed
  • resolution set to fixed

Fixed in [167]. I integrated the diff, but then changed the timestamp to read $dateTimeStamp="&ts=".mktime();

This way you grab the whole timestamp, down to the miliseconds.

in reply to: ↑ 1996   Changed 2 years ago by JXL72

  • keywords obsniQlTvApl added

The low self-esteem present in Bad Nerves may have originated in childhood, related to upbringing or family dysfunction, or it may be linked to years of depression. ,

Note: See TracTickets for help on using tickets.
Scanned by Orvant Copyright © 2010 Kreotek, LLC. All Rights reserved.