Questions tagged [hashbang]

The hash-bang "#!" is used in AJAX-based web applications to indicate that it has web crawler support. For the shell script shebang ("#!" at the start of a file), use the [shebang] tag instead.

"Hash-bang" is a nickname for the sequence "#!" (octothorpe, exclamation mark). It is used

  • in URLs to indicate that this is a AJAX-based web application with web crawler support

  • in Unix shell scripts to identify the executable that should be used to parse this file, e.g.

    #!/bin/bash
    #!/usr/bin/perl -w
    

    to run a script with the bash shell or with Perl (in warnings mode) respectively. Use the tag for these questions instead.

157 questions
3
votes
0 answers

Understanding Googlebots AJAX crawling

I've been through Googles documentation and countless blog posts about this subject, and depending on date and source, there seems to some conflicting information. Please shine your wisdom upon this lowly peasant, and all will be good. I'm building…
playeren
  • 87
  • 1
  • 6
3
votes
1 answer

should i not use backbone.js because it uses hashbangs?

I'm new to backbone.js and like the idea of structuring javascript. However, i've read it relies on hashbangs which Twitter is trying to eradicate. So my question is should I not use backbone.js due to this?
3
votes
2 answers

What to put in HTML snapshot for hash-bang URL for SEO?

I am using hash-bang URLs in my AJAX application and I am implementing the server-side for: handle ?_escaped_fragment_=key1=value1%26key2=value2 So when I look at Google's FAQ, it says that this URL has an equivalent snapshot It is easy to see…
user193116
  • 3,498
  • 6
  • 39
  • 58
3
votes
1 answer

What is the shebang/hashbang for?

Is there any other use for shebangs/hashbangs besides for making AJAX contents crawlable for Google? Or is that it?
federico-t
  • 12,014
  • 19
  • 67
  • 111
3
votes
1 answer

Hashbang versus URI parse

I am looking to move my site into full async document loading, but I don't want to use the #! method of request processing because 1) I don't want to break links, and 2) I want a more flexible way of processing the URIs the site gets. I've been…
dclowd9901
  • 6,756
  • 9
  • 44
  • 63
3
votes
1 answer

Should I use hashbang/shebang?

I read here that the idea of the shebang (#!) was so Google knows that an alternative conventional URL exists providing the same page "state" So, if I don't have conventional URLs corresponding to these hash-states, am I right to say that I…
Ben G
  • 26,091
  • 34
  • 103
  • 170
3
votes
1 answer

AngularJS - 404 error on page reload after Hashbang removal

After removing the hashbang from my routes using $locationProvider.html5Mode(true); Now when visiting a page, for example "domain.com/download", it will work. But if I reloaded this exact page, it would give me an 404 Error. Links like…
3
votes
1 answer

Optional hash prefix for angular routing

I am currently trying to make an angular app indexable by implementing the _escaped_fragment_-scheme (Google Docs). I am aware of the fact that it is deprecated but as far as I can tell after some research and experiments it is still the safest…
Marc
  • 12,706
  • 7
  • 61
  • 97
3
votes
1 answer

Angular2 rc.5 and hashbang

In previous rc.4 release setting up hashbang #! looked like this bootstrap(ApplicationComponent, [.... {provide: LocationStrategy, useClass: HashLocationStrategy}, {provide: APP_BASE_HREF, useValue: '!'} ]); Now in rc.5 everything got…
3
votes
2 answers

why do `#!/usr/bin/env var=val command` gets into an infinite loop

In man(1) env it say: env [OPTION]... [-] [NAME=VALUE]... [COMMAND [ARG]...] So consider print_A.sh: #!/usr/bin/env A=b bash echo A is $A When I run it with ./print_A.sh it hangs. Running it with strace ./print_A.sh I get the following log,…
Chen Levy
  • 15,438
  • 17
  • 74
  • 92
3
votes
0 answers

Better to use Hashbangs or History API with history.js for single-page application?

The way I see it, it seems like hashbangs were a 'hacky' fix that actually do quite well! However, it seems like the History API (pushstate popstate) is the RIGHT way to make a single page application and is actually reasonable now that History.js…
3
votes
1 answer

AngularJS Minfication Error with $provide.decorator

I have the following code (to force hashbang in the urls) in my app.config which is creating issues in minification: app.config(["$provide", function ($provide) { .. $provide.decorator('$sniffer', function ($delegate) { …
Arslan Akram
  • 1,266
  • 2
  • 10
  • 20
3
votes
1 answer

Handling _escaped_fragment_ on root path in AppEngine

I'm using Google App Engine to host an AngularJS app with a Python webservice. The root path / is setup to return index.html, /api/* requests go to the Python controllers for webservice calls, and any other path goes to static resources (images,…
user605331
  • 3,718
  • 4
  • 33
  • 60
3
votes
1 answer

Angularjs : $locationProvider.hashPrefix("!") ;

I want to show url as "www.test.com/!#" for that i am using $locationProvider.hashPrefix("!") ; but it shows url as "www.test.com/#!" . i want "!" before hash not after hash. Thanks var app = angular.module('app', []); app.config(function…
user2534381
  • 215
  • 1
  • 3
  • 9
3
votes
1 answer

How do I use #! instead of just # in Durandal URLs?

By default, URLs created using Durandal's router is formatted as such: http://example.com/#/whiskey-tango-foxtrot However, I'd like to use #! for SEO purposes, so that the URL looks like this: http://example.com/#!/whiskey-tango-foxtrot For more…
Young
  • 442
  • 5
  • 14
1 2
3
10 11