Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/url/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如果已经存在问号,如何向URL添加随机字符串以防止缓存?_Url_Random_Apache Flex - Fatal编程技术网

如果已经存在问号,如何向URL添加随机字符串以防止缓存?

如果已经存在问号,如何向URL添加随机字符串以防止缓存?,url,random,apache-flex,Url,Random,Apache Flex,我需要通过Flex启动一个随机URL,以防止缓存 当前URL以/?propertyID=Neighthood 1&planCode=StreetScene 我通常可以添加一个+(“?”+Math.random().toString())使其随机,但在本例中根本不起作用 这是因为一个问号已经存在吗?在这种情况下,添加随机字符串以覆盖缓存的最佳方式是什么?感谢您的帮助如果您需要在URL中传递多个参数,请使用“?”作为第一个参数,使用“&”作为其余参数: "/?propertyID=Neighborh

我需要通过Flex启动一个随机URL,以防止缓存

当前URL以
/?propertyID=Neighthood 1&planCode=StreetScene

我通常可以添加一个
+(“?”+Math.random().toString())
使其随机,但在本例中根本不起作用


这是因为一个问号已经存在吗?在这种情况下,添加随机字符串以覆盖缓存的最佳方式是什么?感谢您的帮助

如果您需要在URL中传递多个参数,请使用“?”作为第一个参数,使用“&”作为其余参数:

"/?propertyID=Neighborhood1&planCode=StreetScene&random=" + Math.random().toString();

如果需要在URL中传递多个参数,则第一个参数使用“?”,其余参数使用“&”:

"/?propertyID=Neighborhood1&planCode=StreetScene&random=" + Math.random().toString();