Cache control headers problem


I use WPT and WPT Monitor internally in my company.

I have some issue regarding cache control issues.

Some application has incorrectly implemented them and for some static resources it returns “Cache-control” instead “Cache-Control” and for some it returns: “Cache-Control:max-age=86400, public, max-age=86400, public”.

The problem is that IE behaves differently while used by WPT and while used normally for those resorces. Normally it caches them. While used in tests - does not.

Am I correct that this is connected to those wrong headers?

We are not able to correct quickly the application but we need quick comparison of results from different locations. Mentioned problem adds some overhead that is difficult to measure. Is there any way of correcting WPT to behave exactly as Internet Explorer? I test with IE8.


Artur Sudnik

How does it behave differently? WPT actually USES Internet Explorer (the full browser, not just the web control) to do the testing.

When I perform the scenario manually with IE8 I got only 2 requests for RV. The same scenario in WPT on the same machine and with IE8 registers 10 requests for RV. All the additional requests have mentioned wrong headers.

I understand how WPT works but it is weird behavior I am unable to explain. Unfortunately this is not publicly available service to demonstrate this.

Are you closing the IE browser and re-opening it before testing the RV manually? WPT’s RV test is a new browser session repeat view. If you are keeping the browser open then you’ll be using the browser’s session cache which has very different heuristics.

No, I don’t close the browser in both cases. While testing with WPT I use script that reopens the page after visiting it already. It is really strange for me as I use WPT over the year and have some understanding of it and of results I’ve been getting so far. The only it happens are those headers with errors because other resources are cached. One more thing I did not mension - the application is served over https.

Any chance you are navigating to about:blank between the pages? If so, try navigating to a different blank page ( works if you need one and can reach it from the test machine). The code treats about:blank specially since it’s the page that we start the browser up on and it might be triggering some cache clearing or other code.


Sorry for delayed response - I was on my summer holidays.

It seems that WPT misbehaves when credentials are present in test scenario. The application requires authentication on http level. When I forgot to enter them and because they are stored by IE on agent, scenario worked and mentioned resources were not downloaded after caching them.

Now I am sure that when credentials are entered into WPT test configuration, the strange behavior takes place.

Navigating to empty page between the pages does not change anything.

Best regards,