SMF icon indicating copy to clipboard operation
SMF copied to clipboard

Browser caching

Open norv opened this issue 14 years ago • 10 comments

We will need to change ?fin20 to alpha1 (or dev), for the first community tests. Possibly other small versioning stuff.

norv avatar May 02 '12 06:05 norv

Perhaps that should have made that a variable so we do not have to edit all those files everytime

Spuds avatar May 02 '12 13:05 Spuds

@Spuds I can do that, if you think it's fine :)

DrDeejay avatar May 06 '12 12:05 DrDeejay

Done: https://github.com/DrDeejay/playpen/commit/91623e9d60deb1f3d8378a85efd51b366cbc876b and https://github.com/DrDeejay/playpen/commit/658d5d895fb251f081ad2e42fec6bc939bc82beb

I'm sure I've missed many things, but I wanted to be sure that it's fine this way before I start editing the other cache versions. :)

DrDeejay avatar May 06 '12 13:05 DrDeejay

There are many other places where ?fin20 is used, not only index template.

Also, I don't think yet another global like this is an answer, we're trying to remove them globals, not add to them.

norv avatar May 06 '12 15:05 norv

I understand. :) But a question though, in which file should it be put? I was thinking of using the context variable, but that one is defined later in index.php so I didn't know if it would be fine there. What do you think?

DrDeejay avatar May 06 '12 18:05 DrDeejay

My gut reaction was not to use a global (well once I saw it of course).

There are well over 40 places that ?fin20 is used, which is why they are missed from time to time :P

Don't know how folks feel about defining a constant for this purpose define('SMF_BROWSER_SALT', '?dev21') or some such thing. Don't know really.

Spuds avatar May 06 '12 23:05 Spuds

A constant sounds good to me :)

DrDeejay avatar May 07 '12 09:05 DrDeejay

str_replace(' ', '', $context['forum_version']);

:P

emanuele45 avatar May 07 '12 21:05 emanuele45

I did consider that, but thought it was a bit clunky, even fro 2,1 :P

Spuds avatar May 07 '12 23:05 Spuds

Looks like we are going to leave this old school for this round ... find/replace

Spuds avatar May 09 '12 15:05 Spuds