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.

153 questions
752
votes
7 answers

What's the shebang/hashbang (#!) in Facebook and new Twitter URLs for?

I've just noticed that the long, convoluted Facebook URLs that we're used to now look like this: http://www.facebook.com/example.profile#!/pages/Another-Page/123456789012345 As far as I can recall, earlier this year it was just a normal…
BoltClock
  • 630,065
  • 150
  • 1,295
  • 1,284
81
votes
3 answers

pushState and SEO

Many people have been saying, use pushState rather than hashbang. What I don't understand is, how would you be search-engine friendly without using hashbang? Presumably your pushState content is generated by client-side JavaScript code. The scenario…
Harry
  • 47,045
  • 66
  • 163
  • 243
52
votes
3 answers

URL hash-bang (#!/) prefix instead of simple hash (#/) in Angular 1.6

My URLs on an AngularJS project have changed from localhost:3000/admin#/ to localhost:3000/admin#!/ since the last time I worked on my project... Nothing found on the web, does someone know what this is ?
SherloxTV
  • 1,204
  • 2
  • 11
  • 25
44
votes
4 answers

Python script gives `: No such file or directory`

I have several python scripts which work just fine but one script has (as of this morning) started giving me this error if I try to run it from the bash: : No such file or directory I am able to run the 'broken' script by doing python…
Bas Jansen
  • 3,010
  • 4
  • 26
  • 60
28
votes
3 answers

To hashbang or not to hashbang?

I'm developing a new website and I'd like to make use of AJAX as much as possible. Basically, I want users to almost never navigate away from the homepage and have everything displaying in popup windows, sliders, sections etc. Now our existing…
Marko
  • 68,081
  • 26
  • 118
  • 153
26
votes
2 answers

Doing links like Twitter, Hash-Bang #! URL's

Possible Duplicate: What’s the shebang/hashbang (#!) in Facebook and new Twitter URLs for? I was wondering how Twitter works its links. If you look in the source code, you use the links are done like /#!/i/connect or /#!/i/discover, but they…
ixchi
  • 2,119
  • 2
  • 22
  • 23
26
votes
2 answers

Is including harmful for pages with hashbang?

Google says about this meta tag: The following important restrictions apply: The meta tag may only appear in pages without hash fragments. Only "!" may appear in the content field. The meta tag must appear in the head of the document. Source:…
Christoph
  • 21,851
  • 24
  • 86
  • 121
23
votes
3 answers

PathLocationStrategy vs HashLocationStrategy in web apps

What are the pros and cons of using: PathLocationStrategy - the default "HTML 5 pushState" style. HashLocationStrategy - the "hash URL" style. for instance, using HashLocationStrategy will prevent the feature of scrolling to an element by its #ID,…
Murhaf Sousli
  • 10,769
  • 18
  • 103
  • 170
17
votes
3 answers

How to handle facebook sharing/like with hashbang urls?

I am building a website where from the homepage i will open some other URI on the website into a lightbox (AJAX), and i want to use HTML5 push state and hash bangs as a fallback to manage changes of states. Now i want the urls to be crawlable and…
skiplecariboo
  • 782
  • 1
  • 8
  • 21
15
votes
2 answers

Hashbang URLs using Ember.js

I am trying to set up my Router to use "hashbang" URLs (#!). I tried this, but obviously it doesn't work: App.Router.map(function() { this.route("index", { path: "!/" }); this.route("otherState", { path: "!/otherState" }); }); Is this…
twiz
  • 6,335
  • 5
  • 35
  • 67
14
votes
2 answers

Cannot access page on Refresh due to Hasbangs in a React SPA

I'm using a ReactJS SPA created from https://github.com/facebookincubator/create-react-app I'm using S3 and Cloudfront to serve my website. Everything works fine until I reload the page - it throws an error (Access denied in my case) as it is not…
13
votes
2 answers

Backbone.js routing without changing url

I am migrating a single-page web application based on Backbone.js and jQuery to a Chrome extension. However, neither the pushState nor the hashbang-based router modes seem to play well with the environment within the extension. I've come to the…
user2398029
  • 6,108
  • 6
  • 42
  • 76
11
votes
3 answers

jQuery Mobile and "query parameters" for hashbang navigation

I am using jQuery Mobile and have few pages in one HTML page. When opening these pages, I'd like to pass parameters for them, so that their parameters are persistent in URL. E.g.
Mikko Ohtamaa
  • 69,174
  • 40
  • 208
  • 346
11
votes
1 answer

Twitter text js , not calculating the length from text which contains urls with #!

I am using Twitter text js to calculate length of text with urls containing #!. eg: "Some text http://domain.com#!/path/p/56319216 #tag1 #tag2". In firefox debugger error generates on this line in twitter text js …
Dharmendra
  • 206
  • 1
  • 14
9
votes
1 answer

Backbone.js URL Routing

When setting up routes on backbone.js, it seems the framework automatically preprends # to it. I.e. routes : { "example/:id" : "handler" }, will match a link of www.example.com/#example/123 Is it possible to add the hashtag later on in the url? I'm…
bijanv
  • 147
  • 1
  • 1
  • 10
1
2 3
10 11