Is there any other use for shebangs/hashbangs besides for making AJAX contents crawlable for Google? Or is that it?
What is the shebang/hashbang for?
3.4k Views Asked by federico-t At
1
There are 1 best solutions below
Related Questions in AJAX
- Ajax jQuery firing multiple time display event for the same result
- Implement Onfailure in webApi controller
- AJAX PHP - Reload div after submit
- ajax load data from mysql
- Ajax-update only a component attribute, not the whole component nor its children
- using ajax to get a php database result and then show the result in a button
- How to prevent browser from executing some JavaScript when person clicks Back button?
- ajax async: true statement execution order
- Rails 4.2 jQuery loads only after refresh
- WebForms GET Json requests (JsonRequestBehavior.AllowGet)
- Rails - Ajax do not work properly on production server
- Angular js Button click
- Make jQuery/AJAX perform instantly on page load
- jQuery Ajax Uncaught TypeError: Cannot use 'in' operator to search
- Show success or error messages in Ajax response to Wordpress custom registration form
Related Questions in WEB-CRAWLER
- Scrapy CrawlSpider not following links
- python scrapy login redirecting problems
- Google spider gives 404 error on Angular links: how to fix it?
- Watson Content Analytics: How to make web crawler plug-in to get data, sending POST request?
- scrapy startproject error
- Crawler architecture: Avoid getting requests counted in Google Analytics
- application.cfc - conditionally turn on session and/or client management?
- Sails.js static html renderer
- How to download text contained in JavaScript files via crawler4j?
- T_STRING error in my php code
- Select option from dropdown and submit request using nodejs
- Web-Crawler for VBA
- How to extract the content of an HTML attibute
- No performance gain with python threading
- Delay when extracting email
Related Questions in GOOGLE-CRAWLERS
- Google not crawl my website
- Google spider gives 404 error on Angular links: how to fix it?
- For how long does the google bot wait after document ready before taking a snapshot of the webpage?
- Google Webmaster API - Mark crawlerros as fixed
- Google does not index startpage (index.html) of AJAX application correctly but all subpages containing a hashbang (#!)
- "Fetch as Google" is showing an empty page for inline JS while page renders fine on browser
- How do I stop google from crawling my Bitly Branded short domain?
- Use pano id of new photo spheres with Google Streetview Image API
- Serving HTML snapshot from alternative server when using #! and _escaped_fragment_
- AJAX - Google Crawling and 'Fetch as Google'
- Tips to find 500+ old pages
- Does Google ever see my code?
- Does it matter if the Disallow path is different from Drupal’s directory?
- Crawlers visiting my cronjobs?
- PageSpeed Insights: Server-side rendering or Client-side rendering?
Related Questions in HASHBANG
- Linked in share and hashbang url
- Google does not index startpage (index.html) of AJAX application correctly but all subpages containing a hashbang (#!)
- URL hash-bang (#!/) prefix instead of simple hash (#/) in Angular 1.6
- Hashbang URLs (#!) problems in wordpress
- AJAX - Google Crawling and 'Fetch as Google'
- Use Backbone Router to deal with Hashbang for SEO content indexing?
- CouchDB URL Rewriting for SEO
- Angularjs : $locationProvider.hashPrefix("!") ;
- Unregistered values of rel attribute in anchor tag
- How to handle facebook sharing/like with hashbang urls?
- jQuery animation with escaped-fragmented URL (hash-bang, #!)
- Hashbang, prereder.io and the robots
- is Pushstate inferior to Hashbangs when it comes to caching?
- lost_pass=1 URL of my crawled but unindexed product pages on GSC
- Crawlable Ajax content. SEO-ing without hashbang. Is my way ok?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
The hash when used in a URL has existed since long before Ajax was invented.
It was originally intended as a reference to a sub-section within a page. In this context, you would, for example, have a table of contents at the top of a page, each of which would be a hash link to a section of the same page. When you click on these links, the page scrolls down (or up) to the relevant marker.
When the browser receives a URL with a hash in it, only the part of the address before the hash is sent to the server as a page request. The hash part is kept by the browser to deal with itself and scroll the page to the relevant position.
This is what the hash syntax was originally intended for, so this is the direct answer to your question. But I'll carry on a bit and explain how we got from there to where we are now...
When Ajax was invented, people started wanting to find ways to have a single page on their site, but still have links that people could click on externally to get directly to the relevant content.
Developers quickly realised that the existing hash syntax could do this for them, because it is possible to read the URL's hash value from within javascript. All you have to do then is stop it from scrolling when it sees a hash (which is easy enough), and you've got a bit of the URL which is effectively ignored by the browser, but can be read and written to by javascript; perfect for use with Ajax. The fact that Google includes the hash part of a URL in its searches was just a lucky bonus to begin with, but has become quite important since the technique has become more widespread.
I note that people are calling this hash syntax a "shebang" or "hashbang", but technically that's incorrect; it's just a hash that is relevant -- the 'bang' part of the word "hashbang" refers to an exclamation mark ('bang' is a printing industry term for it). Some URLs may indeed add an exclamation mark after the hash, but only the hash is relevant to the browser; the string after it is entirely up to the site's authors; it may include an exclamation mark or not as they choose, but either way the browser won't do anything with it. Feel free to keep calling it a hashbang or shebang if you like, but understand that only the hash is of significance.
The actual term "shebang" or "hashbang" goes back a lot further, and does refer to a
#!syntax, but not in the context of a URL.The original meaning of this term was where these symbols were used at the beginning of a Unix script file, to tell the script processor what programming language the script is written in.
So this is indeed an answer to your question, the way you've worded it, but is probably not what you meant, since it has nothing to do with URLs at all.