Email
Share

We Rock Your Web Forum » Content Management Systems » Drupal

Cache Buster for Drupal?

(2 posts)
  1. DrupalJunkie

    senior member
    Joined: Oct '09
    Posts: 77

    I'm trying to find a cache buster module for Drupal. Specifically, as part of the Ebay Partner Network, I'm given code to put on my site that will refer visitors to Ebay. I want the link code to be HTML (instead of JavaScript), so I can add target="_blank" and rel="nofollow" tags.

    While Ebay has an HTML option for the code snippet, they specify that I must use a CacheBuster where indicated in the code (I'm assuming via PHP), so the image will be assigned a random number and won't be cached. I think their JavaScript does this automatically, but again, I want to use HTML for the reasons above.

    I was unable to find a Cache Buster module for Drupal. Is there a way to custom code this in PHP?

    Posted 1 year ago #

  2. Posted 1 year ago
  3. cwd

    senior admin
    Joined: Jul '09
    Posts: 225

    Yes, simply use the code <?php echo rand(0, 10000000) ?> in the place in the snippet where you need your random number generated. The number of zero's indicate the number of decimal places for the random number.

    Posted 1 year ago #

RSS feed for this topic

Reply

(required)

Allowed markup: BBcode blockquote code em strong ul ol li font strike center u hr.
You can also put code in between backtick ( ` ) characters.