Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    May 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    refreshing the cache...

    Hi guys..

    i keep changing the link for the url-redirect because its for ever moving around to different servers... when people go on the website alot of the browsers remember the URL address from the browsers cache... i tried to make javascript code to get around this.. but have failed... was wondering if any of you could help?

    thanks
    ben

  • #2
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    The only way (except if your page is a dynamic one - php, asp...) is to add a unique variable to your location as a query. The best variable will be the Date in milliseconds (as it is a variavle which is changing all the time. In this case as the location href is always different from the url in cache, the browser will be forced to load it from server. Should work most of the time.

    Try:

    PHP Code:
    <script type="text/javascript">
    var 
    lastTime location.search.substring(1) - 0;
    (new 
    Date()).getTime() - lastTime 1000?location.href location.href '?' + (new Date()).getTime():null
    </script>
     
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

  • #3
    New to the CF scene
    Join Date
    May 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    thanks alot it seems to work...

    great help

    Ben


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •