dmytroshved's avatar

Unusual full page reload when clicking nav links

Hey everyone, I have a weird behavior during clicking my navigation links or another buttons

Sometimes after clicking I see full page reload and I need to click again to make it do the action.

For example, I have those buttons in dropdown for navigation:

    <li><a href="{{ route('recipes.index') }}"</a></li>
    <li><a href="#authors">Authors</a></li>
    <li><a href="{{ route('basics') }}">Basics</a></li>
    <li><a href="{{ route('recipes.create') }}">Add recipe</a></li>

and after clicking one of them I see full page reload. And I see this behavior not only for those links but for anothers. Does someone encountered such problem?

Would be grateful for your help

Best regards

0 likes
11 replies
krisi_gjika's avatar

does this happen locally using Herd or something else?

1 like
dmytroshved's avatar

I am using Wampserver as a webserver, and yeah, I am on local development now

1 like
Glukinho's avatar

What is in actual HTML, not in blade files? Any unwanted JS click handlers?

1 like
dmytroshved's avatar

In my layout file I have those scripts:

<script src="../path/to/flowbite/dist/flowbite.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/flowbite.min.js"></script>
<script type="module" src="https://unpkg.com/[email protected]/dist/ionicons/ionicons.esm.js"></script>
<script nomodule src="https://unpkg.com/[email protected]/dist/ionicons/ionicons.js"></script>
1 like
dmytroshved's avatar

My whole layout file looks like this:

I am using Laravel 11.x

1 like
JussiMannisto's avatar

The first link is broken HTML. Its opening tag is never closed:

-<li><a href="{{ route('recipes.index') }}"</a></li>
+<li><a href="{{ route('recipes.index') }}"></a></li>

It also has no anchor text, so it'll be invisible.

1 like
vincent15000's avatar

I have this behavior with Livewire.

Are you using Livewire too for this project ?

vincent15000's avatar
Level 63

I think that you notice this behavior when you change some code on your Livewire components, then you go back to the browser and you click on a link, you have a full page reload instead of the link action, and then you need to click once again on the link to trigger the link action.

I have the same behavior and ... well ... I don't worry about, it's only in development and not in production.

1 like
dmytroshved's avatar

Oh got it, I am gonna deploy the project and check the behaviour

Sorry for delay and thanks for the reply

Best regards

1 like

Please or to participate in this conversation.