question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Improve navigation

See original GitHub issue

Navigation is hard. Make sure the following navigation scenarios work properly:

  • page.navigate('not-a-url') should return false
  • page.navigate('https://expired.badssl.com/') should return false
  • page.navigate('http://example.com/non-existing-page') should return false
  • page.navigate('http://example.com') with no internet should return false
  • page.navigate('data:text/html,hello') should return true
  • Page’s navigation via inner javascript’s window.location.href = 'http://example.com' should be reported to puppeteer, probably via the Navigated event.

All of this should be also applicable to frame navigation in #4

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
paulirishcommented, Jun 27, 2017

it could return the fetch response object for the main resource

0reactions
aslushnikovcommented, Jun 27, 2017

So the issue with returning true/false is that it’s hard to decide what is a success and what is a failure. For example, navigating to a 404 page might be a valid scenario, since a lot of websites have their own custom-made 404’s.

How about:

  • we consider navigation failed if there’s a navigation timeout or an interstitial
  • anything else returns a status code for the main resource

This should address both @JoelEinbinder and @paulirish concerns. What do you guys think?

Read more comments on GitHub >

github_iconTop Results From Across the Web

6 Easy Ways To Improve Your Site's Navigation
Keep it consistent. · Divide categories clearly. · Make all navigation elements clickable links. · Use accurate navigation titles. · Ensure every ...
Read more >
8 Innovative Ways to Optimize Your Website Navigation
1. Optimize Your Mobile Website's Navigation · 2. Replace the Drop-Down Menus in Your Website Navigation · 3. Make Site Search Frictionless ·...
Read more >
How to Improve Your Website Navigation: 7 Essential Best ...
Handling Navigation in Large Websites · 1. Delegate to Different Departments · 2. Use Tools or Build Tools · 3. Use a Phased...
Read more >
How to Improve Your Website's Navigation
Be sure your navigation is in the same location on each website page. Using the same design, colors, and font will help visitors...
Read more >
10 Ways to Improve Navigation On Your Online Store
Are customers having a hard time finding what they need on your site? Improve navigation on your online store with these 10 types...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found