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/03/28 19:49:18 UTC

[GitHub] [incubator-pagespeed-ngx] adrelanos opened a new issue #1684: anchored links break when javascript is disabled

adrelanos opened a new issue #1684: anchored links break when javascript is disabled
URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1684
 
 
   When javascript is disabled (this is common for users of Tor Browser) anchored links are broken
   
   For example,
   https://www.whonix.org/wiki/Hardened-kernel#Upstreaming
   is rewritten to
   https://www.whonix.org/wiki/Hardened-kernel?PageSpeed=noscript
   
   If anything it should be:
   https://www.whonix.org/wiki/Hardened-kernel?PageSpeed=noscript#Upstreaming
   
   Why is this happening?
   
   Can this be prevented?

----------------------------------------------------------------
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


With regards,
Apache Git Services

[GitHub] [incubator-pagespeed-ngx] Lofesa edited a comment on issue #1684: anchored links break when javascript is disabled in browser (for users of noscript)

Posted by GitBox <gi...@apache.org>.
Lofesa edited a comment on issue #1684: anchored links break when javascript is disabled in browser (for users of noscript)
URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1684#issuecomment-605627484
 
 
   Hi
   Test:
   In Chrome 80.0.3987.149, I have disabled javascript, then 
   I go to `https://www.whonix.org/wiki/Hardened-kernel`, 
   this page redirect me to `https://www.whonix.org/wiki/Hardened-kernel?PageSpeed=noscript`, 
   then I look for the "Upstreaming" link
   clik and go to the anchor
   In the url bar I can see `https://www.whonix.org/wiki/Hardened-kernel?PageSpeed=noscript#Upstreaming`
   
   So is working.
   The file is not a zip file, you must download it and change the file extension deleting the .zip
   
   [screen-capture.webm.zip](https://github.com/apache/incubator-pagespeed-ngx/files/4398849/screen-capture.webm.zip)
   

----------------------------------------------------------------
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


With regards,
Apache Git Services

[GitHub] [incubator-pagespeed-ngx] adrelanos commented on issue #1684: anchored links break when javascript is disabled in browser (for users of noscript)

Posted by GitBox <gi...@apache.org>.
adrelanos commented on issue #1684: anchored links break when javascript is disabled in browser (for users of noscript)
URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1684#issuecomment-606049294
 
 
   I've added `pagespeed SupportNoScriptEnabled false;` to config and this made my page work better with javascript disabled. Anchored links now functional. That was, `pagespeed SupportNoScriptEnabled false;` is counter-intuitive. (I didn't like users seeing any different link `?PageSpeed=noscript` being appended anyhow. Users tend to share links with query parameters intact which makes links ugly.)
   
   Nothing else can be done about this? Possible feature request / bug report? I.e. have the cake and eat it too?

----------------------------------------------------------------
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


With regards,
Apache Git Services

[GitHub] [incubator-pagespeed-ngx] Lofesa commented on issue #1684: anchored links break when javascript is disabled in browser (for users of noscript)

Posted by GitBox <gi...@apache.org>.
Lofesa commented on issue #1684: anchored links break when javascript is disabled in browser (for users of noscript)
URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1684#issuecomment-605627484
 
 
   Hi
   Test:
   In Chrome 80.0.3987.149, I have disabled javascript, then 
   I go to `https://www.whonix.org/wiki/Hardened-kernel`, 
   this page redirect me to `https://www.whonix.org/wiki/Hardened-kernel?PageSpeed=noscript`, 
   then I look for the "Upstreaming" link
   clik and go to the anchor
   In the url bar I can see `https://www.whonix.org/wiki/Hardened-kernel?PageSpeed=noscript#Upstreaming`
   
   So is working.
   The file is not a zip file, you must download it and change the file extensio deleting the .zip
   
   [screen-capture.webm.zip](https://github.com/apache/incubator-pagespeed-ngx/files/4398849/screen-capture.webm.zip)
   

----------------------------------------------------------------
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


With regards,
Apache Git Services

[GitHub] [incubator-pagespeed-ngx] Lofesa commented on issue #1684: anchored links break when javascript is disabled in browser (for users of noscript)

Posted by GitBox <gi...@apache.org>.
Lofesa commented on issue #1684: anchored links break when javascript is disabled in browser (for users of noscript)
URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1684#issuecomment-605977903
 
 
   Ah! I see...
   But I think is the spected behaviour.
   The filter only add a meta refresh label w/ only 1 uri. The meta refreh work in this way:
   1st. check if the browser have javascript enabled and if not, then do a page refresh with redirect to the specified uri, in this case w/ ?PageSpeed=noscript to disbale some filters.
   All the anchor magic is done client side, the server can´t recevie the anchor part. See this https://stackoverflow.com/questions/1637211/get-anchor-from-uri
   
   

----------------------------------------------------------------
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


With regards,
Apache Git Services

[GitHub] [incubator-pagespeed-ngx] adrelanos commented on issue #1684: anchored links break when javascript is disabled in browser (for users of noscript)

Posted by GitBox <gi...@apache.org>.
adrelanos commented on issue #1684: anchored links break when javascript is disabled in browser (for users of noscript)
URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1684#issuecomment-605963055
 
 
   That is correct.
   
   However, when sharing a link such as `https://www.whonix.org/wiki/Hardened-kernel#Upstreaming` it redirects to `https://www.whonix.org/wiki/Hardened-kernel?PageSpeed=noscript` and the user is presented the top of the page.
   
   (As if visiting `https://www.whonix.org/wiki/Hardened-kernel`.)
   
   ----
   
   The same in other words:
   
   1) disable javascript
   2) open a blank browser tab (I used Tor Browser with security slider setting maximum and Chromium with noscript)
   3) paste `https://www.whonix.org/wiki/Hardened-kernel#Upstreaming` into the URL bar
   
   Expected result:
   See chapter `Upstreaming`.
   
   Actual result:
   See top of that page.

----------------------------------------------------------------
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


With regards,
Apache Git Services

[GitHub] [incubator-pagespeed-ngx] adrelanos commented on issue #1684: anchored links break when javascript is disabled

Posted by GitBox <gi...@apache.org>.
adrelanos commented on issue #1684: anchored links break when javascript is disabled
URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1684#issuecomment-605610418
 
 
   Lofesa:
   > Your site works w/o javascript?
   
   Yes. My site works sufficiently well without javascript. At least anonymous reading and anchor links are well functional.
   
   Found https://www.modpagespeed.com/doc/faq#noscript-redirect just now (had wrong search terms in mind earlier).
   
   > The defer_javascript, lazyload_images, dedup_inlined_images, and local_storage_cache filters require JavaScript to render pages correctly. To support clients that have JavaScript disabled, if any of these filters are enabled, PageSpeed will insert a meta refresh inside a noscript tag at the top of the page. This meta refresh will redirect clients with JavaScript disabled to the current URL with a '?PageSpeed=noscript' query parameter appended which disables filters that require JavaScript.
   
   That actually sounds really good. But why does it break anchored link for example `#Upstreaming`?

----------------------------------------------------------------
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


With regards,
Apache Git Services

[GitHub] [incubator-pagespeed-ngx] Lofesa commented on issue #1684: anchored links break when javascript is disabled in browser (for users of noscript)

Posted by GitBox <gi...@apache.org>.
Lofesa commented on issue #1684: anchored links break when javascript is disabled in browser (for users of noscript)
URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1684#issuecomment-606532160
 
 
   Hi
   I think is not in hand of this module change the http spec.
   The purpose of `?PageSpeed=noscript `  is for disable some filter that need javascript to work.
   The metatag refresh (http spec) do a internal redirect to one and only one uri, in this case to the main url with the parameter to disable pagespeed filters.
   In the server side, the anchors are unknow (http spec), so can´t manipulate it. To manipulate the anchors you need some thing in the client side (javascript) but is disabled.
   Not using the `?PageSpeed=noscript ` make some filters don´t work and maybe throw some error mesages in dev tools console. If your site works well s/o making these redirect to disable filters, I can see any mayor problem...

----------------------------------------------------------------
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


With regards,
Apache Git Services

[GitHub] [incubator-pagespeed-ngx] Lofesa commented on issue #1684: anchored links break when javascript is disabled

Posted by GitBox <gi...@apache.org>.
Lofesa commented on issue #1684: anchored links break when javascript is disabled
URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1684#issuecomment-605606498
 
 
   Hi
   Your site works w/o javascript?
   If your site don´t work well w/o javascript then you can disable the noscript filter (by default is enabled)
   
   `pagespeed SupportNoScriptEnabled false;`
   
   This disable adding the /?PageSpeed=noscript

----------------------------------------------------------------
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


With regards,
Apache Git Services