coseos.io

Pass variables between pages with JavaScript

2022-04-27

Passing variables between pages

Unrelated cat

The fonts are available in TrueType (.ttf), Woff (.woff and .woff2) so you can use the fonts for your desktop and your web projects.

  • let params = new URLSearchParams();
  • paras.append("key", "value");
  • location.href=`https://example.com/index.html?${params.toString()}`"

The fonts are provided with an open license, as stated

  • let params = new URLSearchParams(window.location.search);
  • let value = params.get("key");

This will expose the parameters in the URL though. This is considered a bad practice.

Use session storage

Instead of a parameter

Use local storage

When you pull, a fast-forward is ok and will have an effect. To enable fast-forward pull, set it to true.

Use cookies

The use of cookies

Use new window

This method ...

To summarize

Git is a great tool for version control. There are many settings and while some major workflows. You may find other settings, but how often have you taken over a project where it was not clear how git is used.

Thorsten J. Lorenz

I am a software engineer and trainer with 40+ years of experience and i am on track with today's technologies. I held more than thousand professional trainings - for beginners and experts and I can fulfill the role of an architect, lead software engineer, developer, tester and team lead.