Topic: Would be nice to be able to add unique urls.

One way to solve some of the caching issues (that I guess relates to Apache2 and php4) is to make an GET variable that's appended to all the urls(and that I don't use at all, except making unique urls). I guess it would be possible to make as an option.

This makes a page that wouldn't want to reaload in mozilla, to work without fuzz, and in IE I no longer need to press ctrl+F5 to get it to show the current page.

so I have adopted my code on my little competitions script to use
form method=\"POST\" action=\"$PHP_SELF$UnikID\"

or for normal links (this time with a variable bana also)
a href=\"$PHP_SELF$UnikID&bana=$TrackID\"

and then I generate the $unikid as
$UnikID = "?unikid=" . md5(time());

will make a new 32char id every second, but I guess it's possible to skip the md5 and just get the time directly, as it should defenetly not be the same at two different times, but I like the md5. smile

This replacement took a few minutes to do on my little competition engine I have made (somewhere over 50 files), but with the replace text tool it wasn't too bad. I guess that little extra string takes a ms to make, but it solved alot of my problems.

/Frank H

Re: Would be nice to be able to add unique urls.

Hmm. I must have missed this post before. Anyway, is this a problem with PunBB RC 1? I though I had sorted out all the caching issues that have been discovered so far.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: Would be nice to be able to add unique urls.

well it's a problem for me, it might be misconfigured http.conf, but the configuration is very similar to what I used before I upgraded to Apache 2 and php4.

I use Version: 1.0 RC 1. Straight out of the box... smile

I have this problem with a competition site I have made (as I wrote up there), and these unique urls helps alot, as in a day the cache in the browser seems to expire, but while going through the pages, I need to add some junk behind each page to get it to 'refresh'. I've told some that is affected (not me, although I'm very affected when running this forum, on my computer, but not this forum)

I guess it's an Apache 2 issue, as it works fine here on your forum, and not at home, but Apache 2 has solved a few other things I have had problems in the past with, so I'd rather not change back.

I will check for updates on the package I use (Open SA with Darwin(including Perl)) ... as it can be something there too... but so far I haven't been able to fix it. Thus is why I suggest this to get at least an option perhaps, for those having problems. ( I guess if I would find time I would be able to solve it myself, and release a mod, but .. well .. that word 'time' isnt avaible at the moment) wink

Re: Would be nice to be able to add unique urls.

Aha, Apache2 :)

I did add a small workaround for the cache expiry problem with Apache2 (top of header.php). I doesn't appear to have worked though :(. Honestly I'm not too keen on adding more Apache2 specific stuff to the source code. At least not until PHP has "official" support for Apache2. I hear they are currently rewriting the whole damn module.

You could try adding some more "agressive" no-cache headers. Replace the headers sent in header.php with these:

<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="no-cache">
<meta http-equiv="Expires" content="-1">
<meta http-equiv="Cache-Control" content="no-cache">

Perhaps that will help.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: Would be nice to be able to add unique urls.

thanks will try it, or change to whatever my headers are in the competition of mine (those are also very strict, but doesn't help so much, have also been thinking of letting Apache override the headers using the headers module linked to specific directories, but so far I haven't tested it.)

6 (edited by Frank H 2003-03-28 09:40)

Re: Would be nice to be able to add unique urls.

did a very quick n dirty test now ... (just added an echo in the header.php) and it seems to work now smile

Will try to find the appropiate place to put it when I get back home (atm it's placed before the <!DOCTYPE> tag ... smile

Many thanks, will look on the headers I have on my competition later! big_smile

/Frank H

Re: Would be nice to be able to add unique urls.

btw ... a nice feature I miss is 'preview post'  ... I usually try to read through what I've written (when I have the time) to look so I have written everything like I meant ... and then everything like pictures, smilies etc. looks like they should.

I guess it wouldn't be hard to do as a mod though... hmm... crap ... that word time is reappearing again, and I have none wink

Re: Would be nice to be able to add unique urls.

Preview post has been requested before and it is on the todo-list. Don't expect it for 1.0 though.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: Would be nice to be able to add unique urls.

nice smile
I know that the features are 'locked' until after 1.0... but as long as it's planned smile

now I'll sit down to look in the header.php again ... smile

Re: Would be nice to be able to add unique urls.

You could place the meta tags in the head tag in include/main.tpl. Another possible solution is to remove or comment out the header()-calls in header.php. One user has reported success with that method.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: Would be nice to be able to add unique urls.

I added mine in the header.php, where the if statement of Apache 2 is, where the other meta tags are placed.

Unfortunately these metatags isn't 100% ... but it is most probably an Apache2 issue, so I'll do some expire stuff within Apache conf files on the directory also, might help... unfortunately I haven't any time until the weekend, or perhaps busy even after that also sad