Loading a ComponentUrl page is always cached!?

I have to get this working so I clarify from my question from yesterday.
Im trying to reload a componentUrl and pass a parameter to it but it is always cached and no matter what I do I can´t get a new page, always the cached version.

So what do I have to do to get the new page and not the cached version?

According to the docs the below should work, but it is not!

Ok if we start with testing passRouteQueryToRequest the docs say

 When enabled then router will pass current route parameters to request url query (for  `**url**` ,  `templateUrl`  and  `**componentUrl**`
 If you have the following route:
 
 `{ path: '/somepage/', url: 'http://myserver/page/' }`
 
 and you will click link with  **/somepage/?foo=bar**  url then it will load page from  **http://myserver/page/?foo=bar**  url 

So I have a link in my diagram.asp page that looks like this.

<a href="/diagram/?statistikmanad=7" data-force="true" data-ignore-cache="true" data-reload-current="true"> test</a>

And in my app view parameter I have set.

view: {
	componentCache: false
  },

And my routes.js looks like this.

{
	name: 'diagram',
    path: '/diagram/',
    componentUrl: './statistik/diagram.asp',
    options: {
        //animate: true,
		ignoreCache:true,
        reloadCurrent:true,
		force:true
      },
  },

And in my diagram.asp page I have statistikmanad=request.querystring("statistikmanad")

Now, when I click the link it looks like it reloads the page(still just having 1 diagram.asp page as a resource ) and the request.querystring("statistikmanad") is not getting the value 7.

What is wrong here? What am I doing wrong? If I do the same thing with a url instead of componentUrl then it works as it should?

Thanks for your help.

With this it is loading the cached version, how to reload a new page when using componentUrl? Im using V3. If I use just url than it works, but not when I use componentUrl.
According to the docs it should work the same way, but it only load the cached one with componentUrl. No matter what I try it is loading the cached version?!

Or what am I missing? Thanks a lot.

i dont understand what you need. sry, english its not my language
can you make a small jsfiddle, with the error/scenario?
it would be helpful for others to try to help you.

Thanks pvtallulah. I will try to clarify it.

If you have loaded a page called “diagram” and then click a link with
href="/diagram/?statistikmanad=7" data-force="true" data-ignore-cache="true" data-reload-current="true" to reload that page.
Then it reloads the page and you can fetch a query strings value(statistikmanad=7) in that page if you in your routes have this with url:.

{
name: ‘diagram’,
path: ‘/diagram/’,
url: ‘./statistik/diagram.asp’,
options: {
//animate: true,
ignoreCache:true,
reloadCurrent:true,
force:true
},
},

The same if you load the page with this in you .js file.

mainView.router.navigate("/diagram/?statistikmanad=7", {ignoreCache: true,reloadCurrent:true, force:true});

If I in the “diagram” page have this statistikmanad=request.querystring("statistikmanad")
then the variable statistikmanad will have the value 7.

But if I use componentUrl: instead, then it is not reloading the page as a new page, then it only reloads the cached version. And therefore you can´t send a variable and fetch it in that page.

So with this it only serve the cached version.
{
name: ‘diagram’,
path: ‘/diagram/’,
componentUrl: ‘./statistik/diagram.asp’,
options: {
//animate: true,
ignoreCache:true,
reloadCurrent:true,
force:true
},
},

So my question is how can I use componentUrl that is not serving the cached version?
How do I turn of caching when loading componentUrl pages?

This is the issue. Option to disable components cache available since v5 i think

ok thanks a lot, will test it over the weekend :slight_smile:

Yes, finally haha, that was the problem. Thanks a lot Vladimir.
Now I just have to convert it all and see if I stumble on any other problems :wink: