I apologise if this isn't in the right area of the forum, but i'm fairly new here.
Anywho...
This is in regards to an advertising segment on my site. Analysisng proper impressions (i've been told) can be shot somewhat by caches. So i was referred to a cache buster, placed on an 'a href'?
Is this right? Will adding a 'cache buster' be 'damaging' in anyway? I understand it will take longer to load than a cached part would, but I wouldn't want it on the whole site, just the advert. It's so the ad can be properly judged on impressions (cached ad's don't show up as impressions - thus giving an improper read out). Can you put it on one thing, is this ok?
Also, if it's fine to do - to be honest i'm not really sure how to go about doing it. I can't find an example of it done in any code (or one that i've realised). Apparently you have to use a 'random number string' (not a date stamp), as it's more effective if multiple users are clicking the advert. How do you add the 'random number string' to the 'a href'. Do you simply add to the end or something (e.g. <a href = "http://www.site.com/%%randomnumberstring%%">Link</a>?) I really don't know.
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." Brian W. Kernighan
I was told datestamps were bad becuase they could asign the same 'random' string to multiple people if they all clicked an ad at the same time. Why this is bad, i don't know! lol. I think it would send wrong information to all but one of the multiple people?
Lets backtrack here - i assume what you wrote was a datestamp as it says 'timestamp' somehwhere in there, but 2 be honest - i don't know. They may just look similar but refer to completley different things. If that's the case, Is what you've wrote there a 'random number string'? Or is it indeed a datestamp? If it is a datestamp, how would you put a random number string there instead of the that?
A date/time stamp will stop the page from caching since the same person will not request the page more than once at the same time. It doesn't matter if someone else does as that is a different computer. Unlikely that two people would click the link at the exact same millisecond in any case. A random string may duplicate itself defeating the purpose of adding it to the link.
That's interesting. I've seen a few mention otherwise. Personally, I have no idea so I undertook a lil' mission to find out (if cache busters were benficial to my ad's).
Here's one of the site's i found addressing the date stamp vs. random number issue. you guys will be able to make better of if than me i'm sure;
So, it's absolultley fine to do this on your ad's url's then? There's no hidden nuisances are anything? The only thing i can see myself is that obviously it'd load a bit slower than a cache of the ad because it's essentially new, but that's fine (kinda the point). Can anyone see any other potential problem's with using them?
I didn't say date, I said timestamp. Timestamps are generated to the highest partial second resolution of the code doing the generation so unless you're getting thousands of requests per second that won't be an issue. Also, the characteristic of the value that "breaks the cache" is that it is different from the value previously submitted by the same browser. In that case even one second granularity will not matter.
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." Brian W. Kernighan
It's random enough. Obviously (to me at least but maybe to no one else) the string "{timestamp}" represents the output of a bit of code that depends on the server side technology (ASP, PHP, Java, ...).
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." Brian W. Kernighan
I'm sure that's a horrible way to do it, but it'd work, and it has the advantage of not requiring you to use PHP.
Who's your webhost? PHP would be the best way to do this, if you can.
And no, a timestamp isn't a random number. It's actually (in PHP) the number of seconds since 1970. Still, it doesn't need to be a random number. It just needs to change each time the link is clicked on.
Atm, i'm just developing the site, or rather, testing things that i've kinda 'storyboarded' to see if parts I've designed are actually feasable when it comes to actually making the code of the site (if that makes sense!). In other words, just in the preliminary stage of coding tests (well, tests for me as everything is fairly new!).
I was told cache busting can obtimize ad analysis, so i thought it'd be worth implimenting.
I'm using Dreamweaver 8 to put my site together (have Adobe Go Live but am much more familiar with Dreamweaver). So, as i'm completley unversed in PHP - does the PHP version code simply go in the 'coding' of the site in Dreamweaver, or do you have to do it someplace else/some other way? Would you have to have already got all the hosting and the like worked out b4 using this PHP, as my site like i said is still in test phase, not uploaded yet or anything (I have a domain name but no hosting secured as of yet).
This may sound all so stupid, i'm not sure, but I'm fairly new to all this; and in truth have only heard of PHP - i have no real idea of what it does!
PHP is a server-side language. That means that the client won't ever see your code; they'll just see the output. If you find a host that supports PHP, you'd just have to name your page with a .php extension (so the server runs the PHP program on it) and then put the code in as you would normal html.
But, testing it on your computer, the php will never get executed. So, if you get a webhost who supports it, just put that php in where ever you'd put HTML.
Actually, use this. For some reason the shorthand hasn't been working for me lately.
Bookmarks