is Pushstate inferior to Hashbangs when it comes to caching?

时光怂恿深爱的人放手 提交于 2019-12-05 16:01:01

I think that pushstate is inferior, but if you are building a SPA page correctly the differences should not be significant:

Assuming that you are using one of the latest frameworks, your index.html page should be relatively small with a few <script> tags (frameworks like webpack, systemjs etc). The js files that are referenced with these tags do get cached normally so the only difference between the two methods is fetching index.html for every pushstate url as opposed to fetching it once in hashbang mode.

I got the idea from the following question: https://webmasters.stackexchange.com/questions/65694/is-this-way-of-using-pushstate-seo-friendly

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!