You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pagespeed.apache.org by GitBox <gi...@apache.org> on 2020/09/03 10:38:00 UTC

[GitHub] [incubator-pagespeed-ngx] vanushwashere opened a new issue #1711: Duplicated javascript files loading in browser based on Chrome

vanushwashere opened a new issue #1711:
URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1711


   I found out that if we enable `defer_javascript` or `lazyload_images` filtres, some of the JS files on the website load twice.
   I checked that on Firefox and didn't get the same result, so I assume that this is Chromium-based browsers' behavior.
   Also, I found out this bug https://github.com/apache/incubator-pagespeed-mod/issues/1054 which I think is related to this.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-pagespeed-ngx] vanushwashere commented on issue #1711: Duplicated javascript files loading in browser based on Chrome

Posted by GitBox <gi...@apache.org>.
vanushwashere commented on issue #1711:
URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1711#issuecomment-696708718


   ![image](https://user-images.githubusercontent.com/24995381/93886041-fe308080-fcf5-11ea-9565-2678d9bab501.png)
   But there is no preloaded js with disabled PageSpeed module.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-pagespeed-ngx] Lofesa edited a comment on issue #1711: Duplicated javascript files loading in browser based on Chrome

Posted by GitBox <gi...@apache.org>.
Lofesa edited a comment on issue #1711:
URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1711#issuecomment-687090872


   I think the issue is not related to pagespeed module but other plugin you have.
   Some plugin (maybe other way) put files as a link preload header, that is rewrited (have the pagespeed stuf in it) but in the html the file get untouched by pagespeed because it have `<!--This script contains introspective JavaScript and is unsafe to replace.--> 
   `
   Same thing occurs with your jquery.js, but in this case both files (header link and html code) are the same (with pagespeed stuff in it)
   You may avoid this with:
   `pagespeed AvoidRenamingIntrospectiveJavascript off;`
   but this can cause problems. Or can avoid this file to be pushed as a link header and then only load the file in the html code.
   
   ![Captura](https://user-images.githubusercontent.com/22342793/92235222-9edc0f00-eeb3-11ea-86ad-978e9daba1fe.jpg)
   
   ![Captura](https://user-images.githubusercontent.com/22342793/92235327-c59a4580-eeb3-11ea-962d-573a6af5108e.jpg)
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-pagespeed-ngx] vanushwashere commented on issue #1711: Duplicated javascript files loading in browser based on Chrome

Posted by GitBox <gi...@apache.org>.
vanushwashere commented on issue #1711:
URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1711#issuecomment-687066935


   https://strongboxtechnology.10web.cloud/
   here is the website, as you can see it loads `wp-content/cache/tw_optimize/js/two_07f45a878040049d26642d9ad2754c36.js.pagespeed.jm.jNGuvHpZaz.js` and `wp-content/cache/tw_optimize/js/two_07f45a878040049d26642d9ad2754c36.js`.
   If you open https://strongboxtechnology.10web.cloud/?PageSpeed=off you'll see that there is only one load of that file.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-pagespeed-ngx] vanushwashere commented on issue #1711: Duplicated javascript files loading in browser based on Chrome

Posted by GitBox <gi...@apache.org>.
vanushwashere commented on issue #1711:
URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1711#issuecomment-696726344


   Yep, I also think so
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-pagespeed-ngx] Lofesa commented on issue #1711: Duplicated javascript files loading in browser based on Chrome

Posted by GitBox <gi...@apache.org>.
Lofesa commented on issue #1711:
URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1711#issuecomment-696720672


   This filter (hint_preload_subresource), when work (I've never gotten it to work), create the preload header, maybe the filter creates it with the rewrited url, but latter the filter rewrite_javascript can´t rewrite the url in the html because is unsafe to change, this make downlod the same file 2 times, one rewrited and other w/o rewrite.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-pagespeed-ngx] Lofesa commented on issue #1711: Duplicated javascript files loading in browser based on Chrome

Posted by GitBox <gi...@apache.org>.
Lofesa commented on issue #1711:
URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1711#issuecomment-687090872


   I think the issue is not related to pagespeed module but other plugin you have.
   Some plugin (maybe other way) put files as a link preload header, that is rewrited (have the pagespeed stuf in it) but in the html the file get untouched by pagespeed because it have `<!--This script contains introspective JavaScript and is unsafe to replace.--> 
   `
   Same thing occurs with your jquery.js, but in this case both files (header link and html code) are the same (with pagespeed stuff in it)
   You may avoid this with:
   `pagespeed AvoidRenamingIntrospectiveJavascript off;`
   but this can cause problems. Or can avoid this file to be pushed as a link header and the only load the file in the html code.
   
   ![Captura](https://user-images.githubusercontent.com/22342793/92235222-9edc0f00-eeb3-11ea-86ad-978e9daba1fe.jpg)
   
   ![Captura](https://user-images.githubusercontent.com/22342793/92235327-c59a4580-eeb3-11ea-962d-573a6af5108e.jpg)
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-pagespeed-ngx] vanushwashere commented on issue #1711: Duplicated javascript files loading in browser based on Chrome

Posted by GitBox <gi...@apache.org>.
vanushwashere commented on issue #1711:
URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1711#issuecomment-686730238


   Second option: first the PageSpeed rewritten file then the original file.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-pagespeed-ngx] vanushwashere commented on issue #1711: Duplicated javascript files loading in browser based on Chrome

Posted by GitBox <gi...@apache.org>.
vanushwashere commented on issue #1711:
URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1711#issuecomment-696712423


   There is something wrong with `hint_preload_subresource` the issue is gone when I disable that filter


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-pagespeed-ngx] vanushwashere commented on issue #1711: Duplicated javascript files loading in browser based on Chrome

Posted by GitBox <gi...@apache.org>.
vanushwashere commented on issue #1711:
URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1711#issuecomment-696708718






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-pagespeed-ngx] Lofesa commented on issue #1711: Duplicated javascript files loading in browser based on Chrome

Posted by GitBox <gi...@apache.org>.
Lofesa commented on issue #1711:
URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1711#issuecomment-686719581


   It load twice the exact same file? or load 1 time the file and 1 time the rewrited by pagespeed url?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-pagespeed-ngx] Lofesa commented on issue #1711: Duplicated javascript files loading in browser based on Chrome

Posted by GitBox <gi...@apache.org>.
Lofesa commented on issue #1711:
URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1711#issuecomment-687028573


   Can you verify if you have a link header to preload the asset?
   Pagespeed don´t rewrite headers, so if you have it then you have 1st the header and 2nd the html, this last is rewrited by pagespeed and are not the same file name, but had the same content.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-pagespeed-ngx] Lofesa commented on issue #1711: Duplicated javascript files loading in browser based on Chrome

Posted by GitBox <gi...@apache.org>.
Lofesa commented on issue #1711:
URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1711#issuecomment-696720672


   This filter (hint_preload_subresource), when work (I've never gotten it to work), create the preload header, maybe the filter creates it with the rewrited url, but latter the filter rewrite_javascript can´t rewrite the url in the html because is unsafe to change, this make downlod the same file 2 times, one rewrited and other w/o rewrite.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org