How do I Attach or update a timestamp querystring parameter

后端 未结 2 1255
春和景丽
春和景丽 2021-01-17 05:16

I want to attach a timestamp to my querystring in order to ensure that the browser bypasses its cache when I refresh the page via javascript. I need to account for an exist

2条回答
  •  再見小時候
    2021-01-17 05:42

    For manipulating the query string parameters I recommend you this plugin:

    • query-object

    It's very easy to use:

    var timestamp = $.query.get('ts'); // get a value
    
    window.location = $.query.set('ts', newValue); // set a value and navigate
    

提交回复
热议问题