-
-
Notifications
You must be signed in to change notification settings - Fork 602
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sitespeed.io is calculating CSS and Javascript size incorrectly #1963
Comments
Hi @abhagupta thanks for reporting, hmm, looked at the HAR and the response is 304, so I think it could be that we in PageXray only look for 2XX responses when calculating the total size? Let men check that later on today. Best |
@abhagupta I've pushed the change in master, hopefully making a release first thing tomorrow. |
Thanks so much for taking care of this so quickly. I will try it out today. |
@soulgalore On curious note, I am wondering how can we get a 304 anyways. 304 means browser recieved it from cache. But this should not have happened in sitespeed.io / selenium anyway.. am i missing something? |
@abhagupta hmm how are you running (I was thinking you where using a preScript or preURL)? Was it Chrome or FF? By default we use Selenium by creating a new profile etc but you can as extra functionality also add --cacheClearRaw (or --browsertime.cacheClearRaw), then instead of trusting Selenium, we use the Browsertime extension (the WebExtension) to fully clear the cache https://github.com/sitespeedio/browsertime-extension/blob/master/background.js#L146-L164 - I personally always use that last option when running in Docker, it probably be a thing we should add by default. |
Yes we are using a preScript. It does make sense now that it would get 304. I will use the --cacheClearRaw and try it. Thanks |
Ah sorry, I didn't explain it clear enough. The --cacheClearRaw happens before a run (before preScript/preURL). I've seen people in issues trying to disable the cache for Chrome to achieve not caching in pre steps but I haven't fully been able to understand the use case? |
Checkout sitespeedio/chrome-har#1 |
Ah cool.. so its not just me. And it makes much more sense now. I tried to reproduce this on Chrome Dev tools and I saw a similar behavior what sitespeed was showing.. My preScript creates a cookie on the page and refreshes it. So I am definitely on the same page with same assets when its reloaded after cookie is inserted. When I open my app in chrome and check chrome dev tools, I see I get 304 responses for these CSS and Javascript files. (I made sure that I have Disable Cache unhecked, meaning I am letting Chrome to cache the assets). Selenium is doing exact behavior. If I do not clear the cache explicitly in my preScript after loading the cookie, browser is going to load it from cache. Thats what it is meant to do. Btw. I used the Are you sure about I think otherwise because Thanks for all the help and information . |
oops... i guess this option |
Yep, confirmed that cookie that I added in the preScript gets deleted becasue of |
@soulgalore please let me know if the release to pagexray has been made. |
@abhagupta it is released but not sitespeed.io yet. |
@abhagupta released it just now, the container should be there in 5 min. |
Released some time ago, hope it works fine :) |
Hi,
I have a HAR file which is capturing the CSS and JAVASCRIPTs incorrectly. I see the content size of these content types as 0 in the reports even though I see HAR file has CSS and Javascript files.
I am trying to trace down the code which calculates the CSS and Javascript size in PageXray but may be you can tell me more how this is calculated.
HAR file : https://github.com/abhagupta/sample_browsertime/blob/master/browsertime.json
The text was updated successfully, but these errors were encountered: