JavaScript History API Basics

  Рет қаралды 23,798

Codecourse

Codecourse

Күн бұрын

Пікірлер: 31
@itsmedheeraj
@itsmedheeraj 8 жыл бұрын
You don't how how much this tutorial worth for me, i was searching this for years.. and a word came up History api and here i did what you did, and done! thanks a ton
@thewhitesc
@thewhitesc 10 жыл бұрын
your work keeps me motivated to work on big projects !! thank you for your great videos !! keep it up.
@codecourse
@codecourse 10 жыл бұрын
JavaScript History API Basics
@bejbejbej1
@bejbejbej1 7 жыл бұрын
What if the user presses the refresh button? What else would i need to do for the user to be able to refresh to the current content they are on, rather than the whole page. if you press the refresh button on what you currently have, it will give an error page. Anyone know a simple way out of this?
7 жыл бұрын
Load header and footer on all files and load only content with JavaScript, sorry for delay.
@1603stanley
@1603stanley 10 жыл бұрын
thanks alot for all your free lectures. you have played a very great role in my life . Alex the great. only GOD can continue to reward you. stay blessed
@codecourse
@codecourse 10 жыл бұрын
loverofCHRIST kk Awesome! That's what we're here for!
@desdichago
@desdichago 9 жыл бұрын
Amazing explanation, thank you!
@TransmiTV
@TransmiTV 9 жыл бұрын
Thank you SO much for this tutorial. Super helpful!!
@dawizard300388
@dawizard300388 10 жыл бұрын
Thank you, any videos about the security you are talking at the end of this video ?
@berkanbilgin2287
@berkanbilgin2287 7 жыл бұрын
Perfect introduction, thx a lot
@larrydalmeida8238
@larrydalmeida8238 8 жыл бұрын
Great intro. Thanks!
@DamianGarciaIT
@DamianGarciaIT 6 жыл бұрын
It would be nice if you can also change the title of the page. For example, change "History API" to "History API - Cats", if you select "Cats" and the same for the other link. Should I use "document.title = History API - Cats"?
@lustigvideoyoutube8052
@lustigvideoyoutube8052 8 жыл бұрын
Dude thanks very much!!!!
@bFix
@bFix 10 жыл бұрын
Good for the basics but would be better in combination with .htaccess and rewrite rules -> the content could be loaded dynamically from a db and you don't need to link to the content.php files manually if you add a new page
@codecourse
@codecourse 10 жыл бұрын
Thanks for the suggestion. Perhaps we'll create a video on this too.
@bejbejbej1
@bejbejbej1 8 жыл бұрын
Could you do a tutorial on how to dynamically load content from a db? (htaccess) That would be great.
@bFix
@bFix 8 жыл бұрын
I only mentioned the htaccess as a fallback I wasn't very clear on that the dynamic db access is nothing else but ajax that loads a normal php/python page that outputs the new data, but doesn't output the normal page again you use xmlhttprequest 2.0 (ajax) to send your request to a php page, for the php it looks like a normal POST/GET request, it queries the requested data from your db and outputs it either as XML, JSON or even HTML then your js receives the answer and you have to parse the output it might be the easiest way to use json here, for xml and html you have to use xpath/xquery or travel the dom but what you'll use depends on your taste there are surely lots of tutorials out there how to do xmlhttprequests ;) (xhr in short) EDIT: the htaccess would manage to actually supply a full page including the new data, if you copy the link and open a new tab with it (after using the js techniques of this video to alter the browsing history/changing the open URL)
@bejbejbej1
@bejbejbej1 8 жыл бұрын
Piratekiller99 what do I have to do the code (exact same as the video) so that I can use my index.php (or any other page in the future) as my master page/template. In other words on the links will be within index.php, with everything working from this video? *****
@TakangacomIndio
@TakangacomIndio 9 жыл бұрын
Tu eres el mejor.
@bejbejbej1
@bejbejbej1 7 жыл бұрын
What if the user presses the refresh button? What else would i need to do for the user to be able to refresh to the current content they are on, rather than the whole page. if you press the refresh button on what you currently have, it will give an error page. Anyone know a simple way out of this?
@bejbejbej1
@bejbejbej1 7 жыл бұрын
@CodeCourse #CodeCourse
@dhaferharrathi
@dhaferharrathi 7 жыл бұрын
im looking for a solution too :/ any help plz ?
@ronaldc8634
@ronaldc8634 5 жыл бұрын
@@dhaferharrathi same
@IIIxwaveIII
@IIIxwaveIII 8 жыл бұрын
why not use history.pushState(href, null, href); and later retrieve it from popstate's e.state instead of manipulating and parsing location.pathname?
@SerenityReceiver
@SerenityReceiver 10 жыл бұрын
First: Thank you. Then: Why is there "no way" 15:10 of reliably getting the href...? It is relative and it is set by you, also there is nothing to split off of cat.php (which is href).....?
@nikey646
@nikey646 9 жыл бұрын
***** There is an entirely reliable way of getting the href, you use the first parameter which is an object that will be passed to the OnPopState event, and stored in the history.state object. Why alex didn't just go "new {href:href}" to reliable pass the href is beyond me.
@Red1ska
@Red1ska 4 жыл бұрын
i have problem after fetchAndInsert(href); please help
@P8860
@P8860 8 жыл бұрын
Do you have the source code? I followed the tutorial but am getting undefined?=229192
@ArnoldsKtm
@ArnoldsKtm 10 жыл бұрын
Can't we use "return false;" instead of "e.preventDefault();"? Never mind lol stackoverflow.com/questions/1357118/event-preventdefault-vs-return-false
Using the History API - JavaScript Tutorial
16:40
dcode
Рет қаралды 32 М.
History API  - Part 2 (The Good Stuff)
24:23
Steve Griffith - Prof3ssorSt3v3
Рет қаралды 7 М.
Will A Basketball Boat Hold My Weight?
00:30
MrBeast
Рет қаралды 152 МЛН
Это было очень близко...
00:10
Аришнев
Рет қаралды 7 МЛН
PROOF JavaScript is a Multi-Threaded language
8:21
Beyond Fireship
Рет қаралды 287 М.
Easy PHP Database Handling With PHP ActiveRecord
16:35
Codecourse
Рет қаралды 12 М.
The history API is dead. Long live the navigation API | HTTP 203
17:52
Chrome for Developers
Рет қаралды 36 М.
JSON and AJAX Tutorial: With Real Examples
40:45
LearnWebCode
Рет қаралды 1,8 МЛН
Create A Slide Out Menu With CSS
18:37
Codecourse
Рет қаралды 20 М.
Make a fun animated audio player with JavaScript and CSS3
24:13
Codecourse
Рет қаралды 87 М.
Super Simple PHP Pagination
20:52
Codecourse
Рет қаралды 62 М.
"The Life & Death of htmx" by Alexander Petros at Big Sky Dev Con 2024
23:01
Montana Programmers
Рет қаралды 68 М.
Pure CSS Dropdown Navigation Bar
28:41
Codecourse
Рет қаралды 34 М.
I built the same app 10 times // Which JS Framework is best?
21:58
Fireship
Рет қаралды 2,6 МЛН
Will A Basketball Boat Hold My Weight?
00:30
MrBeast
Рет қаралды 152 МЛН